Built on advanced on-device AI and hardware acceleration to deliver professional-grade performance with uncompromising privacy.On-device AI — professional-grade, fully private.
Color Converter Hub
Convert any colour into twelve formats — nothing uploaded.
- Runs on your device
- Twelve formats, including OKLCH
- Contrast + colour-blindness check
- Whole stylesheets: 200 colours free
Drop a stylesheet or token file
CSS, SCSS, SASS, LESS, JSON, SVG or TXT — up to 10.0 MB
#FF4D4D
Nearest colour name: tomato (Same family, distance 6.4)
- HEX
#FF4D4D - RGB
rgb(255 77 77) - HSL
hsl(0 100% 65.1%) - HWB
hwb(0 30.2% 0%) - HSV
hsv(0 69.8% 100%)Not CSS - CMYK
cmyk(0% 69.8% 69.8% 0%)Not CSS - LAB
lab(59.906 67.771 41.299) - LCH
lch(59.906 79.363 31.36) - OKLAB
oklab(0.673 0.19441 0.09082) - OKLCH
oklch(0.673 0.21457 25.04) - Display P3
color(display-p3 0.9239 0.3574 0.3319) - XYZ D65
color(xyz-d65 0.45232 0.27107 0.09872)
Contrast
- AA normalFail
- AA largePass
- AAA normalFail
- AAA largeFail
- AA normalPass
- AA largePass
- AAA normalFail
- AAA largePass
- AA normalFail
- AA largePass
- AAA normalFail
- AAA largeFail
Nearest passing shade — #E22D35 clears 4.51:1 against your comparison colour.
Colour vision
How this colour appears to people with each kind of colour-vision deficiency.
- Typical vision
- Protanopia
- Deuteranopia
- Tritanopia
- No colour vision
Any CSS colour syntax, plus cmyk() and hsv().
Values you type here stay put, even when the colour has no hue to show them on.
How to convert a colour
Enter a colour
Type or paste any colour value — a hex code, rgb(), hsl(), oklch(), a CSS colour name, or pick one with the colour picker.
Read every format
All twelve formats appear at once, alongside the nearest CSS colour name and the contrast the colour achieves.
Copy or export
Copy a single value, copy them all, or export the colour as CSS variables, SCSS, Tailwind, JSON tokens, Swift or Android XML.
Every colour format, explained
Twelve formats describe the same colour in different ways, and each exists because it answers a question the others answer badly. Here is what each one is for.
HEX
Six hexadecimal digits for red, green and blue, written as #RRGGBB. It is RGB in a shorter notation and nothing more, so converting between the two is exact in both directions. Add two more digits for opacity: #RRGGBBAA.
RGB
Three numbers from 0 to 255, one per channel, describing how much red, green and blue light a screen emits. It is additive — all three at full strength give white. Modern CSS writes it with spaces, rgb(255 77 77), and the older comma form still works everywhere.
HSL
Hue as an angle around a colour wheel, then saturation and lightness as percentages. Far easier to reason about than RGB when you want a lighter version of the same colour, which is why theming systems reach for it. Its weakness is that equal steps in lightness do not look equal — a yellow at 50% lightness looks far brighter than a blue at 50%.
HWB
Hue, then how much white and how much black are mixed into it. It maps closely to how paint is described, so it is the most natural of the CSS formats for building tints and shades of one hue. When whiteness and blackness together reach 100%, the hue drops out and you get a grey.
HSV
Hue, saturation and value. Not a CSS format, but the one almost every design and image-editing application uses inside its colour picker, so it is the format to reach for when matching a value you read off a picker in another program.
CMYK
Cyan, magenta, yellow and black ink percentages, for print. It is subtractive: ink absorbs light rather than emitting it, so the numbers behave the opposite way round to RGB. The conversion here uses the standard device-independent formula and is not colour-managed — see the limitations section.
LAB
A colour space designed so that the distance between two colours matches how different they look. L is lightness from 0 to 100, and a and b place the colour on green–red and blue–yellow axes. It covers every colour a person can see, far more than a screen can show. CSS lab() uses the D50 white point, which is what this tool emits.
LCH
The same colours as LAB, written as lightness, chroma and hue angle instead of two axes. Because hue is a single number, LCH is the format to use when you want a set of colours that differ only in saturation or only in lightness.
OKLAB
A newer perceptually uniform space that fixes LAB's worst weakness: LAB's blues shift hue noticeably as you change lightness, and OKLAB's do not. Lightness runs 0 to 1 rather than 0 to 100.
OKLCH
OKLAB in polar form, and the format most design systems are moving to. Lighten an OKLCH colour and it stays the same hue; build a palette by holding chroma and hue and stepping lightness, and every step looks like the same size step. It is part of CSS Color 4 and works in every current browser.
Display P3
A wider colour space than sRGB, used by recent Apple and high-end Android screens. It can show reds and greens that sRGB cannot, so a P3 colour often has no exact sRGB equivalent — the tool says so and gives the closest one.
XYZ
The reference space every other one is defined against. You would rarely write it by hand, but it is the common ground all conversions pass through, and it is useful when comparing values between tools that disagree.
Why Use Color Converters?
Using color converters enables you to convert colors between different formats, ensure color consistency across platforms, translate colors for different applications, and work with colors in various contexts.
Benefits of Color Conversion
- Format Compatibility: Convert colors for different platforms and applications
- Color Consistency: Maintain accurate color representation across mediums
- Design Workflow: Streamline color usage in design projects
- Multiple Formats: Support for RGB, HEX, HSL, CMYK, OKLCH, LAB and more
- Real-time Conversion: See color changes instantly
Available Color Converters
Our color converter collection includes tools for converting between all major color formats used in web design, graphic design, and print.
- RGB to HEXConvert RGB color values to hexadecimal format
- HEX to RGBConvert hexadecimal color codes to RGB values
- RGB to HSLConvert RGB color values to HSL format
- HSL to RGBConvert HSL color values to RGB format
- RGB to CMYKConvert RGB color values to CMYK format
- Color PickerInteractive color picker with real-time conversion
RGB to HEX Converter
Convert RGB color values to hexadecimal format. Essential for web development and CSS styling.
HEX to RGB Converter
Convert hexadecimal color codes to RGB values. Translate web colors for use in other applications.
RGB to HSL Converter
Convert RGB colors to HSL format for more intuitive color manipulation and theming.
HSL to RGB Converter
Convert HSL color values to RGB format for display and application use.
RGB to CMYK Converter
Convert RGB colors to CMYK format for print media and professional printing.
Color Picker
Interactive color picker with real-time conversion between RGB, HEX, HSL, and CMYK formats.
OKLCH and modern CSS colour
If you have only ever used HEX and HSL, OKLCH is the one format on this page worth learning. It solves a problem every design system runs into and most people work around by hand.
- Lightening keeps the hue — raise the lightness of an HSL blue and it drifts toward purple; raise the lightness of an OKLCH blue and it stays blue. That is the whole point of a perceptually uniform space.
- Equal steps look equal — a palette built by stepping OKLCH lightness in even increments reads as an even ramp. The same increments in HSL produce a ramp that is crowded at one end.
- One number for saturation — chroma is a single value that means the same thing at every hue, so "the same intensity in a different colour" is a one-number change rather than a guess.
- It reaches colours sRGB cannot — OKLCH can describe colours beyond a standard screen. This tool tells you when that has happened and gives the closest colour the screen can actually show.
Paste any HEX code above and read the OKLCH line to see where your existing colours sit. To move a whole palette across at once, use the whole-file mode below.
Converting a whole stylesheet or token file
Converting one colour is the easy half. Moving an existing project from HEX to OKLCH, or pulling every colour out of a design file to check it, means touching hundreds of values — which is where every other colour converter stops.
- It rewrites, it does not regenerate — the file you get back is the file you gave, with only the colour values changed. Comments, spacing, minification, line endings and everything the scanner did not recognise come through byte for byte.
- It reads seven file types — CSS, SCSS, SASS, LESS, JSON, SVG and plain text. In SVG and JSON every colour lives inside quotes, and those are found too.
- Colour names are opt-in — tan, plum, salmon and red are ordinary English words. Matching them is a switch you turn on, because leaving it on for a text file would rewrite prose.
- It knows what is not a colour — #ff00001 has too many digits, tangerine is not tan, and --tan-100 is a variable name. None of them are touched.
The free plan converts 200 colours at a time, which covers a design system's core palette. Pro removes the limit, queues up to 25 files and returns them as one archive.
Contrast and accessibility
A colour is only usable if the text on it can be read. The contrast panel measures your colour against white, against black and against any second colour, and checks each result against the WCAG thresholds.
- 4.5:1 is the AA requirement for normal body text, and the bar most audits are measured against.
- 3:1 is enough for large text — 18.66px bold or 24px regular and above — and for interface components and graphics.
- 7:1 is AAA for normal text, which is a genuine readability upgrade rather than a formality, particularly for long-form reading.
- Contrast depends only on lightness, so changing the hue of a failing colour will not rescue it. That is why the suggested fix moves lightness and holds the hue you chose.
When a pair fails, the tool searches both lighter and darker for the smallest change that passes, and shows you the result rather than leaving you to guess.
What a colour-blind visitor sees
Around one man in twelve and one woman in two hundred has some form of colour-vision deficiency. The simulation strip shows your colour as it appears with each of the common kinds, so you can check that two colours in a palette stay tellable apart rather than collapsing into each other.
- Protanopia and deuteranopia — the red–green types, and by far the most common. Reds darken and greens and reds converge, which is why a red/green pass-fail indicator is the classic accessibility failure.
- Tritanopia — rare, affecting the blue–yellow axis. Blues and greens converge and yellows can appear pink.
- No colour vision — rarer still, and a useful worst case: if a design works in the greyscale row, it works for everyone.
The simulation models complete absence of one cone type. Partial deficiency is more common and sits somewhere between the simulated view and typical vision — so treat a pair that only just survives the simulation as a pair worth changing.
About Color Converters
Our free color converter tools help you convert between different color formats quickly and easily. Conversions are exact round trips, so HEX, RGB, HSL and CMYK all describe the same colour.
Available Color Converters:
- RGB to HEX: Convert RGB color values to hexadecimal format
- HEX to RGB: Convert hexadecimal color codes to RGB values
- RGB to HSL: Convert RGB color values to HSL format
- HSL to RGB: Convert HSL color values to RGB format
- RGB to CMYK: Convert RGB color values to CMYK format
- Color Picker: Interactive color picker with real-time conversion
Simply select the converter you need from the options above and start converting instantly.
When to Use Color Converters
Use color converters when converting colors between formats, ensuring color consistency, translating colors for different applications, or working with colors in various contexts.
Ideal Use Cases
- Web Development: Convert colors for CSS and HTML
- Graphic Design: Translate colors between design software
- Print Design: Convert RGB to CMYK for printing
- Color Matching: Ensure consistent colors across platforms
- Design Systems: Maintain color consistency in design systems
- Modernising a palette: Move an existing stylesheet from HEX to OKLCH in one pass
Color Conversion Facts
Understanding these facts helps you make informed color conversion decisions.
Key Statistics
- RGB is additive color model for digital displays
- CMYK is subtractive color model for print
- HEX is a shorthand representation of RGB
- HSL provides more intuitive color manipulation
- Conversion between RGB, HEX, HSL, HWB and HSV is exact and reversible
- CSS defines 148 colour keywords, counting both the gray and grey spellings
- A standard sRGB screen shows about 16.7 million colours; LAB and OKLAB describe far more than that
Best Practices
Follow these guidelines to achieve optimal color conversion results.
Quality Considerations
- Verify converted colors match your design specifications
- Test colors on target medium (screen or print)
- Consider color gamut differences between formats
- Use appropriate format for your use case
- Double-check conversions for critical colors
- Build palettes in OKLCH so lightness steps look even, then convert to HEX if you need older support
When Not to Convert
- Don't convert if target format already supports your color
- Avoid converting for colors outside format gamut without verification
- If color accuracy is critical, test on actual medium
- Don't convert for formats not supported by target platform
- Don't convert a colour name inside prose — leave keyword matching off for plain text
Limitations and compatibility
CMYK values use the standard device-independent formula and are not colour-managed, so a press with an ICC profile will differ — treat them as a starting point. Colours outside sRGB are shown as the closest sRGB equivalent and labelled. cmyk() and hsv() are conveniences this tool provides and are not part of CSS, so a browser will not accept them in a stylesheet. Colour-vision simulation models complete dichromacy, not partial deficiency. Everything runs on your device and needs a current browser.
Every conversion runs on your device — nothing you type is uploaded. A single colour resolves into all twelve formats in well under a millisecond, and a stylesheet of 200,000 colours is rewritten in about a third of a second.
Frequently asked questions
What color tools does the hub include?
The hub brings together dedicated converters for RGB to HEX, HEX to RGB, RGB to HSL, HSL to RGB, and RGB to CMYK, plus an interactive color picker. There is also an all-in-one converter that accepts any CSS colour syntax and shows every format at once with a live preview, contrast checking and colour-vision simulation.
Which color formats are supported?
Twelve: HEX, RGB, HSL, HWB, HSV, CMYK, LAB, LCH, OKLAB, OKLCH, Display P3 and XYZ, plus the 148 CSS colour keywords. You can move between any of them and copy accurate, ready-to-use values for each.
What is the difference between RGB and HEX?
RGB describes a color with three numbers from 0 to 255 for red, green, and blue, while HEX writes those same channels in hexadecimal, such as #FF0000 for red. They represent identical colors, so converting between them is lossless; HEX is simply more compact for CSS.
When should I use HSL or CMYK?
Use HSL when you want to tweak a color intuitively by adjusting hue, saturation, and lightness separately, which is great for theming. Use CMYK when preparing artwork for print, since presses mix cyan, magenta, yellow, and black ink rather than emitting RGB light.
Are the color converters free and private?
Yes. Every converter, the colour picker, the contrast checker and the vision simulation are free, with no cap on single-colour conversion, and results update as you type. Nothing you enter is ever uploaded, so your palettes and project colors stay on your own device.
Can the hub check color contrast for accessibility?
Yes. Contrast is measured against white, against black and against any second colour you choose, and each result is checked against WCAG AA and AAA at both normal and large text sizes. When a pair fails, the tool suggests the nearest lighter or darker version of your colour that passes.
What is OKLCH and should I use it?
OKLCH is a colour format in CSS Color 4 built on a perceptually uniform space, which means equal changes in its numbers look like equal changes to the eye. Lighten an OKLCH colour and the hue stays put, where the same change in HSL can drift visibly toward another hue. It is well supported in current browsers and is the format most design systems are moving their palettes to.
How accurate is the RGB to CMYK conversion?
The CMYK figures use the standard device-independent formula, which is what every online converter gives you and what most design software shows by default. It is not colour-managed: a real press needs an ICC profile and a rendering intent, and the same four numbers print differently on coated and uncoated stock. Treat the values as a reliable starting point and confirm critical colours with your printer.
Can I convert all the colors in a stylesheet at once?
Yes. Paste a stylesheet or drop a .css, .scss, .sass, .less, .json, .svg or .txt file and the tool finds every colour in it and rewrites them all in the format you choose. Everything else in the file — comments, spacing, structure — is copied through untouched.
Why does a color show as out of gamut?
Formats like OKLCH, LAB and Display P3 can describe colours that a standard sRGB screen cannot show. When you enter one, the tool tells you and gives the closest sRGB colour, found by reducing saturation while holding the lightness and hue you asked for — which is the method the CSS specification defines for exactly this case.
from 774 ratings
Rate this tool
Tap a star — it takes a second