Every store on StoreFlux gets its own admin dashboard, and store owners want it to look like their brand, not ours. That means the admin has to be themeable from a few inputs, and it has to stay readable when someone picks a color that is too light, too dark, or the wrong shade of blue.
This is how the Admin Branding page works, and how the palette is built.
One input, eleven shades
The store owner picks a primary color. The admin generates an 11-step scale from it, labelled 50 to 950, the same shape Tailwind uses. The generator converts the hex color to HSL, keeps the hue and saturation, and sets lightness at fixed targets: 96% for step 50, falling to 20% for step 950.
Lightness alone can make the ends of a scale look neon or muddy. So the generator lowers saturation at the very light and very dark steps, by 15 points near the top and 10 near the bottom, with a floor so those colors never turn grey.
Applied as CSS variables
The palette is written as CSS custom properties on the root element.…