feat(lib/color): now adding the color management functions
- Discord always worked with #RRGGBB syntax so make a function to translate that in number like the v15 ask to
This commit is contained in:
parent
64a46e1a44
commit
bec18a5a79
1 changed files with 8 additions and 0 deletions
8
src/lib/color.ts
Normal file
8
src/lib/color.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
export const color = {
|
||||
encode: (str: string): number => {
|
||||
return parseInt(str, 16);
|
||||
},
|
||||
decode: (num: number): string => {
|
||||
return num.toString(16);
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue