Quick access

Saved in this browser. Sign in to keep it on all your devices.

Color Converter

Convert between HEX, RGB, HSL, HSV, and CMYK color formats instantly. Pick colors and copy in any format.

#6366f1

Color Variations

Quick Colors

Popular Palettes

Tailwind CSS Colors

Material Design

6 Color Formats

HEX, RGB, HSL, HSV, CMYK, and CSS. All formats available simultaneously.

Visual Picker

Click the color picker or use quick colors for instant selection.

One-click Copy

Copy any format to clipboard. Use it directly in your code.

Frequently Asked Questions

What's the difference between HEX, RGB, and HSL?

HEX is the web standard (#FF5733), RGB is for screens (rgb(255,87,51)), and HSL is more intuitive for humans - you just adjust Hue (color), Saturation (intensity), and Lightness. Use whichever format your project needs!

How do I use these colors in CSS?

Simply copy any format and paste it into your CSS! Use the CSS Variable format for easy theming, or use HEX/RGB directly. Quick tip: click the Copy button next to any format.

How do I match colors from an image or design?

Use the color picker at the top - it's your secret weapon! Click it, then click anywhere on your screen (images, websites, anywhere) to pick that color instantly.

What are those Tailwind and Material Design buttons?

Those are popular color palettes! Click any button to use that color. Tailwind colors work great with Tailwind CSS projects, while Material Design colors match Google's design system.

Version 1.1 Updated What's new

Release notes

  1. v1.1 Latest
    • Added an in-depth guide below the tool, written from what the tool actually does.
    • CMYK values are now calculated correctly, and you can type CMYK to get the screen colour.
    • Type a colour name such as navy or teal into the HEX field.
    • Fields no longer rewrite themselves while you are typing in them.

About the Color Converter

The color converter shows the same color in every common format: HEX and RGB for the web, HSL for easy tweaking, HSV for design tools, and CMYK for print. Type into the HEX, RGB, HSL or CMYK field, or enter a color name such as navy or teal, and the other formats update as you type.

How to use it

  1. 1 Pick a color or type a value in any format.
  2. 2 See the color in all other formats.
  3. 3 Copy the code you need.

Frequently asked questions

How do I convert HEX to RGB?

Split the HEX code into three pairs and convert each from base 16 to base 10. #FF8000 is red 255, green 128, blue 0.

What is HSL?

HSL stands for hue (0–360°), saturation (%), and lightness (%). It makes it easy to create lighter, darker, or muted versions of a color.

Why do screen and print colors look different?

Screens mix light (RGB) and printers mix ink (CMYK). Some bright screen colors cannot be printed exactly, so CMYK values are an approximation.

Hex codes for common colours

These are the standard CSS colour names, which every browser understands. Type any of these names into the HEX field to load it:

  • White #FFFFFF, rgb(255, 255, 255). Black #000000, rgb(0, 0, 0).
  • Red #FF0000, crimson #DC143C, maroon #800000.
  • Blue #0000FF, dark blue #00008B, navy #000080, royal blue #4169E1, sky blue #87CEEB.
  • Green #008000, lime #00FF00, forest green #228B22, teal #008080.
  • Yellow #FFFF00, gold #FFD700, orange #FFA500.
  • Purple #800080, violet #EE82EE, pink #FFC0CB, hot pink #FF69B4.
  • Brown #A52A2A, silver #C0C0C0, gray #808080, light gray #D3D3D3, dark gray #A9A9A9.

One oddity: CSS “darkgray” (#A9A9A9) is lighter than plain “gray” (#808080), because the names come from two older colour lists that were merged. If you need a dark grey for text, something like #333333 or #4B5563 is a better choice.

How a hex code turns into RGB

A six-digit hex code is three pairs of base-16 digits, one each for red, green and blue. Each pair runs from 00 (0) to FF (255). In #4169E1, 41 is 4 × 16 + 1 = 65 red, 69 is 6 × 16 + 9 = 105 green and E1 is 14 × 16 + 1 = 225 blue, so it is rgb(65, 105, 225).

The three-digit form doubles each digit: #F80 is the same as #FF8800. Eight-digit codes such as #4169E180 add an alpha (transparency) pair at the end; this converter takes the three- and six-digit forms, so leave the last pair off.

Converting RGB to CMYK for print

Screens mix light (RGB) and printers mix ink (CMYK: cyan, magenta, yellow and black). The converter uses the standard formula: K is how dark the colour is, 1 − the brightest of R, G and B, and C, M and Y are what is left of each channel once that black is taken out. Dark red, rgb(128, 0, 0), comes out as 0% cyan, 100% magenta, 100% yellow and 50% black.

You can also type CMYK values into the CMYK field to get the screen colour back. Treat the result as a starting point: real printers use colour profiles for the paper and press (such as FOGRA39 or GRACoL), and some bright screen colours, especially vivid greens and blues, simply cannot be printed. Ask your printer for a proof when the colour matters.

HSL, HSV and when to use them

HSL describes a colour by hue (the angle on the colour wheel, 0–360°), saturation and lightness. It is the easiest format for making variations by hand: keep the hue, change the lightness, and you get a tint or shade of the same colour. The Lighten, Darken and shade swatches here work that way.

HSV (also called HSB) uses value instead of lightness and is what design apps such as Photoshop and Figma show in their colour pickers. A fully saturated red is hsl(0, 100%, 50%) but hsv(0, 100%, 100%), which is why numbers copied between the two do not match.

What about Pantone?

Pantone colours are a proprietary, licensed system of physical ink recipes, so there is no exact formula from a hex code to a Pantone number. Online “hex to Pantone” tools only find the nearest swatch in a table, and printed Pantone inks often look different from their screen preview. If a brand uses a Pantone colour, take the official HEX, RGB and CMYK values from its brand guide and use this tool to check them.