Imperator Design
The library

Techniques, not templates

Every trick recreated from the source video as a live, self-contained demo. Search, filter, open, steal.

1 / 4

Readable Labels with contrast-color()

Pass a background to contrast-color() and it hands back black or white, whichever stays readable on it. The four swatches and every step of the ramp below carry the same one-line declaration — no colour was paired by hand, and none was measured. The ramp is there to find the seam: somewhere along it the label flips, and the browser decides where.

cssaccessibilitycolorprogressive enhancementcontrast-color
2 / 4

Blend Any Two Colours with color-mix()

Mixing two colours used to mean a preprocessor function or hand-computed hex values. color-mix() does it in the browser: name a colour space, two colours, and how much of the first one you want. Drag the slider and watch the result bar and the declaration change together — the bar's background is the very color-mix() call printed underneath it.

csscolorcolor-mixinteractionslider
3 / 4

CSS Color Picker Gradients

This demo illustrates how a color picker's saturation/brightness square and hue strip can be constructed using layered CSS gradients. Drag the circular selectors to change the hue, saturation, and brightness, seeing the resulting color instantly.

csscolorgradientsuijavascriptinteractivity
4 / 4

Accessible Status Colors

This demo illustrates how to create accessible status indicators by toning down pure hues and combining color with clear text labels and icons. Colors are derived from HSL custom properties for backgrounds, borders, and text to ensure readability and semantic clarity.

accessibilitycolorui-designcss-variableshslstatus