From bec18a5a79acb6272d592aabf9d91dd4897d774f Mon Sep 17 00:00:00 2001 From: Raphael Date: Sat, 15 Nov 2025 00:25:46 +0100 Subject: [PATCH] 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 --- src/lib/color.ts | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/lib/color.ts diff --git a/src/lib/color.ts b/src/lib/color.ts new file mode 100644 index 0000000..01c8220 --- /dev/null +++ b/src/lib/color.ts @@ -0,0 +1,8 @@ +export const color = { + encode: (str: string): number => { + return parseInt(str, 16); + }, + decode: (num: number): string => { + return num.toString(16); + }, +};