How to Use the Hex to RGB & CMYK Converter
- Enter your color in any format: type a hex code (e.g. #4285F4) in the Hex field, use the color picker, or enter RGB, HSL, or CMYK values. All four formats update instantly.
- Use the copy icon next to each value (Hex, RGB, HSL, or CMYK) to copy that value to your clipboard. A brief βCopied!β message confirms the copy. Paste directly into CSS, design tools, or print specs.
- Check contrast and harmony below the preview: the Accessibility/Contrast section shows WCAG 2.1 AA and AAA pass/fail against white and black. The Color Harmony swatches (Complementary, Analogous, Triadic) are clickable β click any swatch to set it as the primary color.
Understanding Color Spaces
- HEX (Web/Digital): A hex color code (e.g. #FF6900) represents red, green, and blue as two hexadecimal digits each. Itβs the standard in HTML, CSS, and most design tools for screens.
- RGB (Screen Light): Red, Green, Blue as three numbers from 0 to 255. Additive color: light combines to form colors. Used in CSS rgb(), JavaScript, and APIs.
- HSL (Human-centric design): Hue (0β360Β°), Saturation (0β100%), and Lightness (0β100%). Easier for designers to adjust βsame color, lighter/darkerβ or βsame family, different hue.β Supported in CSS as hsl().
- CMYK (Print/Ink): Cyan, Magenta, Yellow, and Key (black) as percentages. Subtractive color used in printing. Screen colors are converted to CMYK for print; the conversion is approximate.
Common Design Colors
| Color | Hex | RGB |
|---|---|---|
| White | #FFFFFF | 255, 255, 255 |
| Black | #000000 | 0, 0, 0 |
| Google Blue | #4285F4 | 66, 133, 244 |
| Success Green | #34A853 | 52, 168, 83 |
When to Use Each Format
Hex (#RRGGBB)
Standard in HTML, CSS, and design tools. Short form #RGB expands to #RRGGBB. Use for web and most digital color pickers.
RGB (R, G, B)
Same as hex but as three 0β255 numbers. Used in CSS rgb(), JavaScript, and APIs. Good when you need separate channel values.
HSL (H, S, L)
Hue is the βcolor angleβ; saturation and lightness make it easier to brighten or darken. Use in CSS hsl() and in UI sliders.
CMYK (C, M, Y, K)
Print standard. Screen (RGB) colors donβt map perfectly to CMYK; this converter uses a standard conversion so you can get approximate print values.
Color Conversion FAQ
? How do I convert hex to RGB?
Split the hex code into three pairs (RR, GG, BB) and convert each from hexadecimal to decimal. #FF6900 is FF=255, 69=105, 00=0, so RGB(255, 105, 0). Use the tool above to paste any hex and get RGB (and HSL, CMYK) instantly.
? What is the difference between RGB and CMYK?
RGB is additive (light): red, green, blue combine to make colors on screens. CMYK is subtractive (ink): cyan, magenta, yellow, and black used in printing. The same visual color has different numeric values in each; converting between them is approximate because RGB can show colors that CMYK cannot reproduce exactly.
? When should I use HSL?
HSL is useful when you want to adjust a color: change Hue to shift the color, Saturation for vivid vs gray, Lightness for lighter or darker. CSS supports hsl() and hsla(). Many design tools use HSL sliders because theyβre easier to reason about than RGB for tweaking.
? Does hex support transparency?
Standard hex is #RRGGBB (opaque). Eight-digit hex adds alpha: #RRGGBBAA (e.g. #FF690080 for 50% opacity). This converter shows RGB, HSL, and CMYK for the color; for alpha youβd add it separately in CSS (e.g. rgba() or #RRGGBBAA).