Color Picker & Converter
Pick or paste a color, get every format — hex, RGB, HSL, OKLCH, CMYK, and the closest named color.
#ff7a59
01 — Overview
How the Color Picker & Converter works
A single-color workbench: enter any format, see all the others. Includes hex, RGB, HSL, OKLCH, CMYK, and the closest CSS named color. Pick from a native color picker or type a value. Conversions are deterministic and run entirely in the browser.
02 — Use cases
When to use the Color Picker & Converter
- 01
Convert a hex code from a screenshot into RGB for a print spec
- 02
Get the OKLCH equivalent of a Figma color for use in Tailwind v4
- 03
Find the closest CSS named color for a hex value
- 04
Sanity-check a CMYK value before sending to a printer
03 — Examples
Color Picker & Converter examples
#ff7a59
ex 01rgb(255, 122, 89) · hsl(11, 100%, 67%) · oklch(73% 0.18 30)
Same color in three different formats.
rgb(48, 209, 88)
ex 02#30d158 · hsl(135, 63%, 50%) · closest named: limegreen
Apple's system green, with its named-color neighbor.
rebeccapurple
ex 03#663399 · rgb(102, 51, 153) · hsl(270, 50%, 40%)
A CSS named color resolved into the three most common notations.
oklch(72% 0.19 30)
ex 04#ff7a59 · rgb(255, 122, 89) · hsl(11, 100%, 67%)
Going the other direction — a modern OKLCH value converted back to legacy formats.
04 — FAQ
Color — frequently asked questions
Is OKLCH lossless from sRGB?
How accurate is the CMYK conversion?
What does 'closest named color' mean?
Which color format should I actually use in CSS?
How is the contrast ratio calculated?
Can hex codes include transparency?
05 — Reference
Specs and further reading
The primary sources this tool follows. Where behaviour is defined by a specification, we link the specification rather than a summary of it.
- CSS Color Module Level 4
W3C — Normative definitions for hex, rgb, hsl, oklch, and conversion between them.
- <color> data type
MDN Web Docs — Practical reference for every CSS color notation this tool converts between.
- Understanding SC 1.4.3: Contrast (Minimum)
W3C WAI — How the contrast ratio shown alongside each conversion is calculated.
07 — More
Tools that pair with Color
Color Palette Generator
Type a vibe — 'desert at dusk', 'cyberpunk lab' — and get a 5-color palette with hex, RGB, HSL, and OKLCH for every swatch.
CSS Gradient Generator
Build linear and radial gradients visually. Pick stops, angle, and direction; copy as CSS or Tailwind arbitrary value.
CSS Box Shadow Generator
Build CSS shadows with sliders for offset, blur, spread, color, and opacity. Live preview, multi-shadow stacking, copy as CSS or Tailwind.