Sign up free

Online Color Converter: HEX, RGB, HSL, HSV and CMYK

Enter a color in any format and get HEX, RGB, HSL, HSV, CMYK and its contrast scores at once.

About Color Converter

A color converter answers the everyday questions of web work: what #1e90ff is in rgb(), how to write a brand color with transparency for CSS, or which CMYK values to give a printer. Type or paste a color as HEX with 3, 4, 6 or 8 digits, RGB or RGBA, HSL or HSLA, HSV, CMYK or a CSS name like tomato, or choose one with the color picker, and every other format appears at once, ready to copy.

Below that you see the WCAG contrast ratio against white, against black and against a second color you choose, with AA and AAA pass marks, so you know whether text in that color will be readable. A palette of tints and shades gives lighter and darker versions for hover states and borders, and a click copies one. CMYK here is a straight mathematical conversion, not a print profile, so ask your printer for exact values on important jobs. For backgrounds, try the CSS Gradient Generator. It all runs in your browser.

How to use Color Converter

  1. 1
    Enter a color

    Type HEX, RGB, HSL, HSV, CMYK or a CSS color name, or use the color picker.

  2. 2
    Copy the format you need

    Every format updates at once, so copy the one your code or design tool expects.

  3. 3
    Check the contrast

    See the ratio against white, black and a second color, with AA and AAA marks.

  4. 4
    Pick a tint or shade

    Click a lighter or darker version of the same color in the palette to copy it.

Why use Cubfile for this

  • Every common format

    HEX, RGB(A), HSL(A), HSV, CMYK or a CSS color name in, every format out.

  • Transparency understood

    4- and 8-digit HEX, RGBA and HSLA values are read with their alpha.

  • WCAG contrast check

    Ratios against white, black and a color of your choice, with AA and AAA marks.

  • Tints and shades

    A ready palette of lighter and darker steps.

FAQ

Color Converter: questions and answers

How do I convert HEX to RGB?
Paste the HEX code, with or without the #, such as #ff6600, and rgb(255, 102, 0) appears along with the HSL, HSV and CMYK values.
What contrast ratio does WCAG require?
For normal text, AA needs at least 4.5:1 and AAA 7:1. For large text, it's 3:1 and 4.5:1. The converter labels each pair AAA, AA, Large text only or Too low.
Are the CMYK values exact for printing?
They're a straight conversion from RGB, fine as a starting point. Printers adjust for their paper and inks with color profiles, so ask them for exact values on important jobs.
Can I use CSS color names?
Yes. Type a name such as tomato or rebeccapurple to get its HEX, RGB, HSL, HSV and CMYK values. When a color matches a CSS name exactly, the name is shown too. Colors buried in a minified stylesheet are easier to find once the CSS Formatter has spread it out.
Is the color converter free?
Yes. It runs in your browser with no sign-up and no limit, and it works offline once the page is loaded.
Share Color Converter with a friendIt runs in any browser, and they can try it without signing up.

Related tools

HTML HTML FormatterIndent messy HTML so it’s easy to read.
JS JavaScript FormatterBeautify minified or messy JavaScript.
CRON Cron Expression GeneratorBuild cron expressions and see the next run times in plain words.
CSS CSS FormatterTurn minified CSS into neat, readable rules.
CSS CSS MinifierMinify CSS to load faster.
HTML HTML MinifierShrink HTML by removing comments and extra whitespace.
HTTP HTTP Request TesterSend GET, POST and other requests to a public API and read the response.
JS JavaScript MinifierStrip comments and whitespace from JavaScript without changing how it runs.