Color Converter
Enter a HEX color or adjust RGB and HSL values to view the supported color formats. Copy values for your design or code, and explore approximate print-color references.
#6366F1
Click to change color
Red99
Green102
Blue241
Hue239
Saturation84
Lightness67
HSV / HSB
H239°
S59%
V95%
CMYK
C59%
M58%
Y0%
K5%
CIE LAB
L50
A39
B-70
XYZ (D65)
X25.77
Y18.5
Z85.42
CSS Formats
HEX#6366F1
RGBrgb(99, 102, 241)
HSLhsl(239, 84%, 67%)
HWBhwb(239 11% 33%)
Pantone Matches
Closest
Pantone 2685 C
#9D4EDC
Pantone Cool Gray 11
#53565A
Pantone 2592 C
#B83DBA
Quick Copy
Focused conversion guides
This page converts between every supported format. For a single direction, the focused pages below keep the relevant input and output front and center with a worked example and specific notes.
HEX to RGB
→#336699 → rgb(51, 102, 153)HEX pairs to red, green, and blue channels
RGB to HEX
→rgb(51, 102, 153) → #336699Channel values to a six-digit HEX code
HEX to HSL
→#336699 → hsl(210, 50%, 40%)HEX to hue, saturation, and lightness
RGB to CMYK
→rgb(51, 102, 153) ≈ cmyk(67%, 33%, 0%, 40%)RGB to an estimated CMYK print breakdown
Understand the other color formats
- HEX / RGB
- Digital color values commonly used for screens and CSS.
- HSL
- A hue, saturation, and lightness representation.
- HSV / HSB
- Hue, saturation, and value (also called brightness), two names for the same component.
- CMYK
- A subtractive, print-oriented model. Unprofiled conversions are estimates and do not guarantee a printed match.
- CIE LAB / XYZ
- Colorimetric representations. LAB and XYZ here are computed from sRGB with a D65 reference white. The displayed CSS
lab()string uses these D65 values directly, so it is not a standards-correct CSSlab()value (which uses D50) without a white-point adaptation. - Pantone
- Approximate reference matching from the implemented data, not a lossless mathematical conversion.
Use a converted color in CSS
These three declarations represent the same reference color, expressed in different formats.
#336699.example {
color: #336699;
border-color: rgb(51, 102, 153);
background-color: hsl(210, 50%, 40%);
}These are reference calculations, not a claim that the converter has been independently validated.
Frequently asked questions
How do I convert HEX to RGB?
Enter the six-digit HEX code in the HEX field. The RGB sliders and values update to the matching red, green, and blue channel values, which you can copy from the RGB row.
Can I convert RGB or HSL back to HEX?
Yes. RGB and HSL are editable inputs: adjust the sliders and the HEX field updates to the synchronized HEX value. Copy the HEX output to use it elsewhere.
Are HSV and HSB different?
No. Value and brightness are two common names for the same component in this model, so HSV and HSB refer to the same representation here.
Why do displayed values sometimes differ slightly?
Values are rounded for display, and each format uses different units and conversion assumptions. Small rounding differences between HEX, RGB, HSL, and the other formats are expected.
Will CMYK values guarantee an exact printed match?
No. CMYK values from an unprofiled conversion are estimates. The final printed result depends on the printer profile, inks, paper, and proofing, so use the values as a starting point for a proper print workflow.
Are the Pantone suggestions exact matches?
No. The Pantone suggestions are approximate matches from the implemented reference data, not a lossless conversion. For production, verify against an official physical Pantone reference.