Developer Tools
Color Converter
Convert screen colors among HEX, RGB/RGBA, HSL/HSLA and HSV/HSB, view an approximate CMYK value and compare two colors with the WCAG contrast formula.
Convert and compare colors
Color Converter
Edit any color representation to update the other screen color models and an approximate CMYK value.
Color values
RGB, HEX, HSL, and HSV are screen-oriented models. CMYK is a mathematical approximation and may not match professional color-managed print workflows.
Preview and output
| Format | Value | Action |
|---|---|---|
| HEX | | |
| RGB / RGBA | | |
| HSL / HSLA | | |
| HSV / HSB | | |
| CMYK | |
- Black Text Contrast
- —
- White Text Contrast
- —
- Higher Contrast
- —
Contrast uses the WCAG relative-luminance formula. Transparent colors are composited on white for these ratios; this is information, not accessibility certification.
Color conversion is processed locally in your browser and is not transmitted or stored by this tool.
Color values and contrast calculations stay in your browser. The tool does not upload palettes or images.
How to convert a color
- 1
Choose HEX, RGB, HSL, HSV or another supported input model.
- 2
Enter the color channels and alpha value when applicable.
- 3
Review equivalent values in the other models.
- 4
Copy the format required by CSS, design software or documentation.
- 5
Use the contrast section to compare text and background colors.
HEX, RGB, HSL and HSV
HEX is a compact way to write RGB channel values. RGB describes red, green and blue light. HSL uses hue, saturation and lightness, while HSV or HSB uses hue, saturation and value or brightness. HSL and HSV share a hue concept but calculate their other channels differently.
Color-conversion example
HEX #ffffff converts to RGB 255, 255, 255. Compared with #000000, it produces a 21:1 black-to-white contrast ratio.
Alpha transparency and visible color
RGBA and HSLA include alpha transparency. A partially transparent color does not have one final visible appearance until it is composited over a background. Use the actual page background when checking contrast.
RGB to CMYK limitations
The CMYK value is a mathematical approximation derived from normalized sRGB. Professional print output depends on ink, paper, device calibration and ICC color profiles. The tool does not convert colors to Pantone or use a printer profile.
Contrast and accessibility
The checker uses relative luminance and the WCAG contrast formula. A ratio is useful for reviewing text readability, but accessibility also depends on font size, weight, states, focus indicators and non-text content.
Important limitations
- Print: approximate CMYK is not a press-ready color proof.
- Pantone: no proprietary spot-color matching is provided.
- Display: monitors and color profiles can show the same value differently.
- Audit: one contrast ratio does not replace full accessibility testing.
Related tools
Color Converter FAQ
How do I convert HEX to RGB?
Enter the HEX value and the tool displays the equivalent red, green and blue channels.
Can it convert RGB to CMYK?
Yes, but the CMYK result is a mathematical approximation without an ICC print profile.
Does it convert colors to Pantone?
No. Proprietary spot-color matching is not included.
What is the difference between HSL and HSV?
Both use hue, but saturation and lightness/value are defined differently.
How is contrast calculated?
The tool applies the WCAG relative-luminance contrast formula to the selected colors.
Are color values stored?
No. Conversions run locally in your browser.
Explore the complete Shopshubb Tools directory or return to Developer Tools.