Re:Building your color palette
by PavlovsCat on Saturday November 10, 2018 @02:32PM
(#18423042)
I made something like that for myself before SASS etc. were a thing, and it's been working so great for me that I keep using it, even though it's kinda derpy. First, I have a bunch of vars, such as
hue9, top_bg_sat, top_bg1_lum, top_bg2_lum
Only those get changed when making new color schemes, and the colors are made up from them like so:
hsl top bg1: [hsl hue9 [float top_bg_sat] [float top_bg1_lum]]
hsl top bg2: [hsl hue9 [float top_bg_sat] [float top_bg2_lum]]
Those colors in I use in the CSS so they can get replaced by the final HSLA color:
allowing modifiers, such e.g. "use this color, but with luminance divided by 1.125".
I would look into options before rolling my own again, but even rolling my own made my life so much easier, so quickly, I would still recommend it just because it's fun.
I would look into options before rolling my own again, but even rolling my own made my life so much easier, so quickly, I would still recommend it just because it's fun.