One base colour, eleven outputs
A colour picker and a hex field both drive the page, beside a Random Color button. Under them sit three rows: five tints, the base as one card, and five shades. Every card is a button that copies its value, and a read-only block below holds the set as custom properties.
A worked example
The default #6366f1 mixes toward white at amounts of 0.95, 0.75, 0.55, 0.35 and 0.15, giving #f7f7fe, #d8d9fc, #b9baf9, #9a9cf6 and #7a7df3. Mixing toward black at the same amounts gives #05050c, #191a3c, #2d2e6c, #40429d and #5457cd. The caption under the palest tint reads 5 percent white even though that swatch is a 95 percent mix, because the tint label subtracts the step instead of printing it. Shade captions use the step directly, counting down 95, 75, 55, 35 and 15 percent black.
What the copy block contains
Eleven declarations inside a root selector, ordered five tints, then base, then five shades. Keys come from hex digits without the hash, so the palest tint becomes a property named after f7f7fe, and the base line is the only stable name a theme can use. Label text on each card flips between dark and white on a luma test at 0.6, which is why the four palest tints keep grey lettering.
Where it stops
- Six digits with an optional hash, nothing more, so shorthand values and eight-digit colour with alpha both raise the red line.
- While that line shows, the previous palette stays on screen as stale swatches.
- Five steps are hard-coded, with no nine-step ramp and no perceptual colour space.
- Extremes collapse, since a #000000 base returns five identical black shades and a white base does the same on the tint side.
- Nothing is measured about accessibility, contrast or naming.
Questions people ask
What separates a tint from a shade?
Each channel is interpolated linearly toward 255 or toward 0 by the step, the classic definition rather than a hue-preserving ramp.
Why do the tint captions look reversed?
Because they report the remainder instead of the mix, so the swatch colour and the position in the row are the reliable guides.
Do these pass contrast rules?
The page cannot say. Test any pair in the colour contrast checker, sample a starting value from the colour picker, or run the ramp through the gradient generator.