Convert
Color Converter
Paste a hex code, CSS name, or channel values and get the other notations at once. Pair queries such as hex to RGB live here instead of on thin extra pages.
Input is processed in your browser. ColorToolMage does not upload it, store it, or send it to analytics.
#336699
Result
HEX
#336699
RGB
rgb(51, 102, 153)
HSL
hsl(210, 50%, 40%)
HSV
hsv(210, 66.7%, 60%)
CMYK (approx.)
cmyk(66.7%, 33.3%, 0%, 40%)
CSS name
no exact named-color match
Alpha
1
How it works
All fields share one sRGB color. HEX, RGB, HSL, and HSV are lossless within rounding. CMYK is labeled as an approximation. Alpha is a unit interval; 8-digit HEX stores it as 00–FF.
Input and output
Input is a hex string, CSS name, or channel numbers. Output is HEX, rgb()/hsl()/hsv() text, approximate CMYK, and an optional CSS name when the hex matches exactly.
Common uses
Brand hex
#336699 becomes rgb(51, 102, 153) and hsl(210, 50%, 40%).
Named color
rebeccapurple becomes #663399.
How to use this tool
- Paste a hex code or CSS color name, or edit RGB, HSL, HSV, or CMYK fields.
- Review the live swatch and the other notations.
- Copy the format you need. Reset returns the example color.
Limitations
- sRGB only. Not Display P3, OKLCH, or Lab.
- CMYK is not color-managed.
- Rounding uses documented nearest-value rules; 0.5 RGB channels round with Math.round.
Questions
- Which HEX lengths are supported?
- 3-digit #RGB, 4-digit #RGBA, 6-digit #RRGGBB, and 8-digit #RRGGBBAA. Other lengths are rejected. 3- and 4-digit values expand by doubling each nibble.
- Is CMYK a print-accurate conversion?
- No. CMYK here is a simple sRGB subtractive approximation. It is not an ICC or printer-managed workflow. Do not use it for press-ready separations.
- Are CSS names supported?
- Yes. The 148 CSS Color Module Level 4 named colors resolve to their specified sRGB hex values.
Related tools
Color Picker
Choose a color with the native picker and sliders, then copy its notations. This is a choose-and-inspect job, not a converter pair page and not an image sampler.
Contrast Checker
Enter two colors and get the WCAG 2.2 sRGB contrast ratio plus independent AA/AAA results. The tool also suggests black or white text on the background.
Palette Generator
Start from one color and build a related set. Harmony modes rotate hue. Shades mix toward black. Tints mix toward white.