How to use
- Pick a base color and a harmony (analogous, complementary, triadic…).
- Press Space to regenerate unlocked colors.
- Export the palette.
Worked example
Base #2F6FEB with the complementary rule gives #9B7000: the hue turned 180° in OKLCH at the same lightness, with chroma reduced to fit sRGB.
Supported formats and limits
| Input | Base color, Image (to extract colors) |
|---|---|
| Output | CSS variables, JSON, Tailwind config, PNG swatch |
| Engine | OKLCH color math; k-means extraction for images |
Limitations
- Colors outside the sRGB gamut are clipped for display.
Questions
How do I make a color palette from one hex code?
Enter the hex code as the base color and pick a harmony: analogous, complementary, split complementary, triadic, tetradic or monochrome. The other colors are computed in OKLCH; lock any you like and regenerate the rest.
Which harmony rules are available?
Analogous, complementary, split complementary, triadic, tetradic and monochrome. Hues are rotated in OKLCH at the same lightness, and chroma is reduced where needed to fit sRGB. #2F6FEB with the complementary rule gives #9B7000.
How are colors taken from an image?
The image is read in your browser and its pixels are grouped with k-means clustering into the main colors. The image is not uploaded.
Does it check contrast?
Yes, between swatches, with an AAA, AA, AA large or Fail label per pair. That rates color pairs only; it does not certify that a design or site is accessible.
Guides
Privacy
Runs on your device. Files and text are processed in this browser tab and are not uploaded.
See the privacy policy for how toolsdocks handles data.