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:
Raphael 2025-11-15 00:25:46 +01:00 committed by Raphaël
parent 64a46e1a44
commit bec18a5a79

8
src/lib/color.ts Normal file
View file

@ -0,0 +1,8 @@
export const color = {
encode: (str: string): number => {
return parseInt(str, 16);
},
decode: (num: number): string => {
return num.toString(16);
},
};