@@ -47,38 +47,44 @@ export type ThemeColors = {
4747 invokeBlueAlpha : PaletteSteps ;
4848} ;
4949
50- const BASE = { H : 220 , S : 12 } ;
51- const WORKING = { H : 47 , S : 42 } ;
52- const GOLD = { H : 40 , S : 70 } ;
53- const WARNING = { H : 28 , S : 42 } ;
54- const OK = { H : 113 , S : 42 } ;
55- const ERROR = { H : 0 , S : 42 } ;
56- const INVOKE_YELLOW = { H : 66 , S : 92 } ;
57- const INVOKE_BLUE = { H : 200 , S : 76 } ;
58- const INVOKE_GREEN = { H : 110 , S : 69 } ;
59- const INVOKE_RED = { H : 16 , S : 92 } ;
50+ const brandColors = {
51+ base : { H : 220 , S : 12 } ,
52+ working : { H : 47 , S : 42 } ,
53+ gold : { H : 40 , S : 70 } ,
54+ warning : { H : 28 , S : 42 } ,
55+ ok : { H : 113 , S : 42 } ,
56+ error : { H : 0 , S : 42 } ,
57+ invokeYellow : { H : 66 , S : 92 } ,
58+ invokeBlue : { H : 200 , S : 76 } ,
59+ invokeGreen : { H : 110 , S : 69 } ,
60+ invokeRed : { H : 16 , S : 92 } ,
61+ } ;
6062
61- export const getArbitraryBaseColor = ( lightness : number ) => `hsl(${ BASE . H } ${ BASE . S } % ${ lightness } %)` ;
63+ export const getArbitraryBrandColor = (
64+ colorScheme : keyof typeof brandColors ,
65+ lightness : number ,
66+ saturationPct : number = 1
67+ ) => `hsl(${ brandColors [ colorScheme ] . H } ${ brandColors [ colorScheme ] . S * saturationPct } % ${ lightness } %)` ;
6268
6369export const colors : ThemeColors = {
64- base : generateColorPalette ( BASE . H , BASE . S ) ,
65- baseAlpha : generateColorPalette ( BASE . H , BASE . S , true ) ,
66- working : generateColorPalette ( WORKING . H , WORKING . S ) ,
67- workingAlpha : generateColorPalette ( WORKING . H , WORKING . S , true ) ,
68- gold : generateColorPalette ( GOLD . H , GOLD . S ) ,
69- goldAlpha : generateColorPalette ( GOLD . H , GOLD . S , true ) ,
70- warning : generateColorPalette ( WARNING . H , WARNING . S ) ,
71- warningAlpha : generateColorPalette ( WARNING . H , WARNING . S , true ) ,
72- ok : generateColorPalette ( OK . H , OK . S ) ,
73- okAlpha : generateColorPalette ( OK . H , OK . S , true ) ,
74- error : generateColorPalette ( ERROR . H , ERROR . S ) ,
75- errorAlpha : generateColorPalette ( ERROR . H , ERROR . S , true ) ,
76- invokeYellow : generateColorPalette ( INVOKE_YELLOW . H , INVOKE_YELLOW . S ) ,
77- invokeYellowAlpha : generateColorPalette ( INVOKE_YELLOW . H , INVOKE_YELLOW . S , true ) ,
78- invokeBlue : generateColorPalette ( INVOKE_BLUE . H , INVOKE_BLUE . S ) ,
79- invokeBlueAlpha : generateColorPalette ( INVOKE_BLUE . H , INVOKE_BLUE . S , true ) ,
80- invokeGreen : generateColorPalette ( INVOKE_GREEN . H , INVOKE_GREEN . S ) ,
81- invokeGreenAlpha : generateColorPalette ( INVOKE_GREEN . H , INVOKE_GREEN . S , true ) ,
82- invokeRed : generateColorPalette ( INVOKE_RED . H , INVOKE_RED . S ) ,
83- invokeRedAlpha : generateColorPalette ( INVOKE_RED . H , INVOKE_RED . S , true ) ,
70+ base : generateColorPalette ( brandColors . base . H , brandColors . base . S ) ,
71+ baseAlpha : generateColorPalette ( brandColors . base . H , brandColors . base . S , true ) ,
72+ working : generateColorPalette ( brandColors . working . H , brandColors . working . S ) ,
73+ workingAlpha : generateColorPalette ( brandColors . working . H , brandColors . working . S , true ) ,
74+ gold : generateColorPalette ( brandColors . gold . H , brandColors . gold . S ) ,
75+ goldAlpha : generateColorPalette ( brandColors . gold . H , brandColors . gold . S , true ) ,
76+ warning : generateColorPalette ( brandColors . warning . H , brandColors . warning . S ) ,
77+ warningAlpha : generateColorPalette ( brandColors . warning . H , brandColors . warning . S , true ) ,
78+ ok : generateColorPalette ( brandColors . ok . H , brandColors . ok . S ) ,
79+ okAlpha : generateColorPalette ( brandColors . ok . H , brandColors . ok . S , true ) ,
80+ error : generateColorPalette ( brandColors . error . H , brandColors . error . S ) ,
81+ errorAlpha : generateColorPalette ( brandColors . error . H , brandColors . error . S , true ) ,
82+ invokeYellow : generateColorPalette ( brandColors . invokeYellow . H , brandColors . invokeYellow . S ) ,
83+ invokeYellowAlpha : generateColorPalette ( brandColors . invokeYellow . H , brandColors . invokeYellow . S , true ) ,
84+ invokeBlue : generateColorPalette ( brandColors . invokeBlue . H , brandColors . invokeBlue . S ) ,
85+ invokeBlueAlpha : generateColorPalette ( brandColors . invokeBlue . H , brandColors . invokeBlue . S , true ) ,
86+ invokeGreen : generateColorPalette ( brandColors . invokeGreen . H , brandColors . invokeGreen . S ) ,
87+ invokeGreenAlpha : generateColorPalette ( brandColors . invokeGreen . H , brandColors . invokeGreen . S , true ) ,
88+ invokeRed : generateColorPalette ( brandColors . invokeRed . H , brandColors . invokeRed . S ) ,
89+ invokeRedAlpha : generateColorPalette ( brandColors . invokeRed . H , brandColors . invokeRed . S , true ) ,
8490} ;
0 commit comments