🔒 Runs in your browser — nothing is uploaded✓ Free, no signup
Color Picker & Converter — HEX, RGB, HSL & CMYK
Pick a color or type any color code to convert it between HEX, RGB, HSL and CMYK. See WCAG contrast against white and black text, plus tints and shades.
Color codes
- HEX
#6D28D9 - RGB
rgb(109, 40, 217) - HSL
hsl(263, 70%, 50%) - CMYK
cmyk(50%, 82%, 0%, 15%)
Contrast (WCAG)
White text on this color
7.1:1 — AAA
Black text on this color
2.96:1 — Fails
Tints and shades
- #F0E9FB
- #D1BBF3
- #B18DEB
- #925FE3
- #7231DB
- #5920B6
- #431887
- #2C1059
- #15082B
When should you use the Color Picker & Converter?
- Converting a brand HEX code to RGB or HSL for CSS
- Checking whether white or black text is readable on a background color
- Building lighter and darker variations of a color for a UI palette
How to use the Color Picker & Converter
- 1
Choose a color
Use the color picker, or type a HEX, RGB, HSL value or CSS color name.
- 2
Copy the format you need
HEX, RGB, HSL and CMYK update together. Click Copy next to any of them.
- 3
Check contrast
See whether white or black text on this color passes WCAG AA or AAA.
- 4
Explore shades
Click a tint or shade to make it the current color.
Examples
Converting a HEX code
Input
#FF6347
Output
RGB rgb(255, 99, 71) HSL hsl(9, 100%, 64%) CMYK cmyk(0%, 61%, 72%, 0%)
Common errors and how to fix them
My color isn't recognised- Check the format: HEX needs 3, 4, 6 or 8 hex digits; rgb() values must be 0–255; hsl() saturation and lightness must be percentages.
The HEX code has 8 digits- The last two digits are transparency (alpha). For example #00000080 is black at 50% opacity.
More from Design & Color
Free tools that run in your browser — no signup, nothing uploaded.
Color Palette Generator
Generate harmonious color palettes and export them as CSS, Tailwind or JSON.
CSS Gradient Generator
Build linear and radial CSS gradients visually and copy the code.
PX to REM Converter
Convert pixels to rem and rem to pixels for any root font size.
CSS Box Shadow Generator
Design layered CSS box shadows visually and copy the CSS or Tailwind class.
CSS Border Radius & Blob Generator
Set rounded corners per side or make organic blob shapes, then copy the CSS.
Glassmorphism CSS Generator
Create frosted-glass UI cards with backdrop blur and copy the CSS.
CSS Clamp() Fluid Size Calculator
Generate clamp() values for fluid typography and spacing between two screen sizes.
CSS Text Shadow Generator
Build CSS text shadows — soft, neon, outline or retro — and copy the code.
JSON Auto-Fixer & Formatter
Repair, validate, and beautify broken JSON (missing quotes, trailing commas).
Color Picker & Converter FAQ
Type or paste the HEX code (for example #FF6347) into the input. The RGB value — rgb(255, 99, 71) — appears instantly along with HSL and CMYK, each with a Copy button.
HEX (#RGB, #RRGGBB and #RRGGBBAA with transparency), rgb() and rgba(), hsl() and hsla(), and CSS color names such as tomato or rebeccapurple. Output is HEX, RGB, HSL and CMYK.
RGB describes a color by its red, green and blue light. HSL describes it by hue (the color on the wheel), saturation (how vivid) and lightness. HSL is easier for creating lighter or darker variations of the same color.
It's a standard mathematical conversion and a good starting point. Professional printing uses color profiles, so check with your printer for exact CMYK values.
They follow WCAG 2 accessibility guidelines. A ratio of 4.5:1 or higher passes AA for normal text, 3:1 passes AA for large text, and 7:1 passes AAA. Use them to choose readable text colors.
They keep the same hue and saturation and change only the lightness, from very light to very dark. Click any swatch to use it as the current color.
