Color Picker
Pick colors, convert between formats, find the nearest CSS and Tailwind color, build OKLCH palettes and copy it all as code.
Saturation & Lightness
HEX
RGB
HSL
OKLCH
CMYK
HSV
Code
--color-brand: #6467F2;Put it in a :root rule and use it as var(--color-brand).
Nearest Colors
The closest CSS named color and Tailwind default color, by how different they look (OKLab distance, ΔE OK). Under 0.02 is hard to tell apart.
CSS Name
mediumslateblue
#7B68EE
CloseΔE OK 0.034Tailwind 4
indigo-500
oklch(58.5% 0.233 277.117)
Outside sRGB, so the closest hex is #615FFF
CloseΔE OK 0.029Tailwind 3
indigo-500
#6366F1
Very CloseΔE OK 0.003
Palettes
Eleven steps of OKLCH lightness at your color's hue and chroma, named 50 to 950 like Tailwind's colors. Your color takes the step closest to its own lightness.
- White text
- 1.10below AA
- Black text
- 19.05passes AA
- White text
- 1.41below AA
- Black text
- 14.92passes AA
- White text
- 1.83below AA
- Black text
- 11.51passes AA
- White text
- 2.42below AA
- Black text
- 8.66passes AA
- White text
- 3.31below AA
- Black text
- 6.34passes AA
- White text
- 4.41below AA
- Black text
- 4.76passes AA
- White text
- 5.81passes AA
- Black text
- 3.62below AA
- White text
- 7.70passes AA
- Black text
- 2.73below AA
- White text
- 10.16passes AA
- Black text
- 2.07below AA
- White text
- 13.22passes AA
- Black text
- 1.59below AA
- White text
- 15.39passes AA
- Black text
- 1.36below AA
Under each swatch: white text and black text on it, as a WCAG 2 ratio. AA marks 4.5:1 or more, enough for body text. A color sRGB can't show loses chroma until it fits, so its hue and lightness stay put.
The code names the colors brand-50 to brand-950. Swap brand for your own name after you paste.
How to use this tool
Pick a color
Drag the saturation and lightness gradient to adjust those values, then use the Hue slider to choose a hue. You can also type a hex value (like #4F46E5), an RGB triplet (79, 70, 229), or HSL values (243, 75%, 59%) into any input field. All other fields update instantly to match.
Read the values in every format
The picker shows HEX, RGB, HSL, HSV, OKLCH, and CMYK at the same time, so you can copy the format your target tool expects. Each field updates live as you drag the gradient or adjust a single channel.
Copy any field to clipboard
Click the copy button next to any format. The value is copied in a form ready to paste into CSS, Tailwind, Figma, a config file, or print specs without further editing. For app code, pick a format in the Code row: a CSS variable, a Tailwind 4 theme entry, SwiftUI, Jetpack Compose, Android or Flutter.
Find the nearest named color
The Nearest Colors card names the closest CSS named color, Tailwind 4 color and Tailwind 3 color, with how far off each one is. Click Use to switch the picker to that color, or Copy Name to grab the name for your CSS or class list.
Build a palette
In the Palettes card, choose Tints & Shades or one of the four color harmonies. Click a swatch to make it the picked color, or copy the palette as CSS variables or a Tailwind 4 @theme block.
Adjust hue, saturation, or lightness directly
For fine-grained edits, type new hue (0-360°), saturation (0-100%), or lightness (0-100%) values into the HSL inputs. The color updates in every other format as you type, so you can dial in a precise adjustment. To work in OKLCH instead, type lightness (0-100%), chroma (0-0.4) and hue (0-360°) into the OKLCH fields.
About this tool
The Color Picker lets you pick or paste a color and shows it in HEX, RGB, HSL, HSV, OKLCH, and CMYK at once, with a copy button on every field. All six stay in sync as you edit, whether you're turning a designer's hex code into an HSL value for CSS, prepping print artwork in CMYK, or tweaking a brand color's saturation.
Use it to match a color across tools (a hex from Figma, an RGB triplet for a config file, a CMYK value for a print shop) or to build a palette with fine control over lightness in HSL or OKLCH. A full spectrum gradient handles visual selection, numeric inputs cover every channel, and the Nearest Colors card tells you which CSS named color or Tailwind color is closest.
Supported formats
HEX (#RRGGBB), RGB (0-255 per channel), HSL (hue 0-360°, saturation and lightness 0-100%), HSV (same hue, saturation/value 0-100%), OKLCH (lightness 0-100%, chroma 0-0.4, hue 0-360°), and CMYK (cyan, magenta, yellow, key black 0-100%). Conversions are standard sRGB, with no ICC profile applied.
Copy as code
The Code row writes the color for six places: a CSS variable, a Tailwind 4 @theme entry, SwiftUI, Jetpack Compose, Android View code and Flutter. The CSS and Tailwind formats call the color brand, so rename it after you paste. Tailwind 4 reads colors from @theme in your CSS file. Tailwind 3 kept them in tailwind.config.js, so the entry only works in Tailwind 4. SwiftUI gets each channel divided by 255 with three decimals, which is enough to land on the same color. Compose and Flutter put the alpha first (ARGB), and since the picker has no transparency, it's always FF. The format you pick last is saved in this browser, not in the link.
Nearest CSS and Tailwind colors
The picker checks your color against every CSS named color and the default Tailwind 4 and Tailwind 3 palettes. It ranks them by ΔE OK, the distance between two colors in OKLab, so the match is the color that looks closest, not the one with the most similar hex digits. Tailwind 4 colors come from the OKLCH values in Tailwind's own theme file. Picking a match with Use changes the color in the link too, so you can share it.
Palettes from one color
The Palettes card builds five palettes from the picked color, all in OKLCH. Tints & Shades keeps hue and chroma and spreads lightness over 11 steps named 50 to 950, with your color on the step nearest its own lightness. The four harmonies keep lightness and chroma and turn the hue: 180° for complementary, 30° each way for analogous, 120° each way for triadic, and 150° and 210° for split complementary. A color sRGB can't show loses chroma until it fits, the way CSS Color Level 4 maps colors. Under each swatch you get the WCAG ratio of white and black text on it, with AA marked. The copied code names the colors brand-50 to brand-950, or brand with brand-complement and the like. In compare mode both colors use the same scheme.
When to use it
Use it to translate colors between Figma, CSS, Tailwind arbitrary values, Photoshop, and print specs. Pair it with the Contrast Checker to verify your text color combinations meet WCAG AA or AAA, which the Color Picker alone doesn't enforce.
Popular color scenarios
Guides to the color formats and conversions behind web and print work, plus colors people look up often.
Frequently asked questions
How do I convert HEX to RGB?
What's the difference between HSL and HSV?
How does the picker find the nearest CSS or Tailwind color?
Why are Tailwind 4 colors different from Tailwind 3?
How do I use a color in SwiftUI, Jetpack Compose or Flutter?
How do I make a color palette from one color?
What happens when I type an OKLCH color outside sRGB?
Why does CMYK look different from RGB on my screen?
What is the difference between #RGB and #RRGGBB?
Can I pick a color from an image?
What is the sRGB color space?
Related tools
Contrast Checker
Check color contrast ratios for WCAG AA/AAA accessibility compliance.
Use toolColor Gamut Visualizer
Draw sRGB, DCI-P3, Adobe RGB and Rec. 2020 on the CIE chart, enter a monitor's primaries, and see its coverage and area of each one.
Use toolText Encoding Converter
Convert text to Base64, binary, hex, URL encoding and HTML entities, and back again.
Use toolPPI & Retina Calculator
Calculate PPI and Retina distance for your display.
Use toolUse this tool on your own site
Drop the Color Picker into your blog, docs, or CMS with one iframe snippet. Free, no signup. See all embeddable tools