Color Code Converter

Convert between HEX, RGB, HSL, HSV, and CMYK — free, instant

Supported input formats: #HEX, #HEX3, rgb(), hsl() — picker always outputs HEX

Color Code Formats Explained

Colors on the web can be represented in several different formats. Understanding the differences helps you choose the right format for your project and convert between them when needed.

HEX (#RRGGBB)

The most common web color format. A # followed by 6 hexadecimal characters (00–FF) representing Red, Green, Blue channels. Example: #FF5733.

RGB (Red, Green, Blue)

Defines colors using three integers (0–255) for red, green, and blue channels. Example: rgb(255, 87, 51). Most natural for screen-based design.

HSL (Hue, Saturation, Lightness)

Hue is 0–360° (color wheel), Saturation 0–100% (gray to vivid), Lightness 0–100% (black to white). More intuitive for designers to adjust.

HSV/HSB (Hue, Saturation, Value/Brightness)

Similar to HSL but Value represents the maximum brightness of the color. Used in many design applications including Photoshop.

CMYK (Cyan, Magenta, Yellow, Key/Black)

Subtractive color model used in printing. Values are percentages (0–100%). Not used in web CSS but essential for print design.

How to Convert Color Codes

  1. 1

    Enter your color

    Type any color in HEX (#3B82F6), RGB (rgb(59,130,246)), or HSL (hsl(217,91%,60%)) format in the input field.

  2. 2

    Use the color picker

    Click the color swatch on the right to open a visual color picker and select any color interactively.

  3. 3

    Click Convert

    All equivalent color codes are displayed — HEX, RGB, HSL, HSV, and CMYK.

  4. 4

    Copy the format you need

    Click the copy icon next to any format to copy it to your clipboard instantly.

Frequently Asked Questions

When should I use HEX vs RGB?
HEX is more compact and universally supported in CSS, HTML, and design tools. RGB is clearer when you need to adjust individual color channels programmatically or use opacity (rgba).
What is the difference between HSL and HSV?
In HSL, a lightness of 100% always gives white. In HSV, a value of 100% gives the pure color (not white). HSL is used in CSS; HSV is used in most graphical design tools.
How do I convert HEX to RGB manually?
Split the HEX code into pairs (RR, GG, BB) and convert each pair from base-16 to base-10. For #FF5733: R=255, G=87, B=51.
What colors can HEX not represent?
Standard 6-digit HEX can represent 16,777,216 colors (256³). This matches the 8-bit RGB color space, so they cover the same gamut. Neither represents HDR or wide-gamut colors (P3, Rec. 2020).

Popular searches: hex to rgb converter • rgb to hex • hex color picker • color code converter online • hsl to hex • color format converter • cmyk to rgb