Color Picker
Pick colors, convert between formats, find the nearest CSS and Tailwind color and copy it 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
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.
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.
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?
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