DesignUpdated March 30, 2026

Color Space Converter Guide: RGB, HSL, CMYK, and LAB Explained

By The hakaru Team·Last updated March 2026

Quick Answer

  • *RGB (screens) and CMYK (print) are the two most important color spaces for designers.
  • *HSL is the most intuitive format for adjusting hue, saturation, and lightness by hand.
  • *CMYK has a smaller gamut than RGB — bright screen colors often look duller in print.
  • *CIELAB is perceptually uniform and used for precise color difference calculations (Delta E).

What Is a Color Space?

A color space is a specific way of organizing and representing colors as numbers. Think of it as a coordinate system for color. Just as you can describe a location using latitude/longitude or street address, you can describe a color using RGB, HSL, CMYK, or dozens of other systems.

Each color space was designed for a specific purpose. RGB maps to how screens emit light. CMYK maps to how printers mix ink. HSL maps to how humans intuitively think about color. Understanding when to use each one is a core design skill.

The Major Color Spaces Compared

Color SpaceChannelsPrimary UseGamut Size
RGBRed, Green, Blue (0–255)Screens, web, UI~16.7 million colors
HexSame as RGB, in hexadecimalCSS, design tokens~16.7 million colors
HSLHue (0–360°), Saturation, LightnessColor adjustment, CSS~16.7 million colors
HSV/HSBHue, Saturation, Value/BrightnessColor pickers (Photoshop, Figma)~16.7 million colors
CMYKCyan, Magenta, Yellow, Key (0–100%)Print productionSmaller than RGB
CIELABLightness, a* (green–red), b* (blue–yellow)Color science, quality controlDevice-independent

RGB: The Language of Screens

RGB is an additive color model. Each pixel on your screen is a cluster of red, green, and blue sub-pixels. By varying the intensity of each (0 to 255), the screen can produce approximately 16.7 million unique colors(256 × 256 × 256).

According to StatCounter, over 96% of websites use RGB-based color values (hex or rgb() notation) in their CSS. It is the default color space for web development and digital design.

When to Use RGB

  • Any design destined for screen display (web, mobile, TV)
  • CSS and frontend code
  • LED lighting and video production
  • Image editing for digital output

HSL: The Human-Friendly Format

HSL stands for Hue, Saturation, and Lightness. It represents the same colors as RGB but organizes them in a way that matches human perception. Hue is the color wheel position (0–360 degrees), saturation is the intensity (0–100%), and lightness is how bright or dark the color is (0–100%).

CSS natively supports HSL via hsl() and hsla() functions. The CSS Colors Level 4 specification also introduced oklch() and oklab(), which improve on HSL's perceptual uniformity. According to the 2025 State of CSS survey, adoption of oklch() has grown to 18% among frontend developers, up from 3% in 2023.

HSL vs. HSV/HSB

FeatureHSLHSV/HSB
Third channelLightness (0% = black, 100% = white)Value/Brightness (0% = black, 100% = full color)
White atL = 100%S = 0%, V = 100%
Used byCSS, web developmentPhotoshop, Figma, Sketch color pickers
Pure colors atS = 100%, L = 50%S = 100%, V = 100%

The key difference: in HSL, L = 50% gives you the pure, fully saturated color. In HSV, the pure color is at V = 100%. This makes HSL slightly more intuitive for creating tints (add lightness) and shades (reduce lightness).

CMYK: The Language of Print

CMYK is a subtractive color model. Ink absorbs (subtracts) light wavelengths from white paper. Cyan absorbs red, magenta absorbs green, and yellow absorbs blue. The “K” (Key) channel adds black ink because mixing CMY alone produces a muddy dark brown, not true black.

According to the International Color Consortium (ICC), the CMYK gamut is approximately 55–65% of the sRGB gamut, depending on the specific ink and paper combination. This is why vibrant screen colors often appear muted when printed.

Colors That Shift in CMYK

RGB ColorHexCMYK Appearance
Electric blue#0000FFShifts to a darker, less vivid blue
Neon green#39FF14Becomes significantly duller
Hot pink#FF69B4Loses vibrancy, shifts slightly orange
Deep purple#7B2FBEAppears more muted and gray

Always soft-proof your designs in CMYK before sending to a printer. Every professional design tool (Adobe InDesign, Illustrator, Affinity Publisher) has a CMYK preview mode.

CIELAB: The Science of Color Perception

CIELAB (L*a*b*) was defined by the International Commission on Illumination (CIE) in 1976. It is designed to be perceptually uniform: a numerical change of 1 unit looks the same to the human eye regardless of where you are in the color space.

The three channels are L* (lightness, 0–100), a* (green to red, roughly –128 to +127), and b* (blue to yellow, roughly –128 to +127). CIELAB is device-independent, meaning it describes colors as humans see them rather than as a specific device produces them.

Delta E: Measuring Color Difference

Delta E (ΔE) is the Euclidean distance between two colors in CIELAB space. The most accurate version is CIEDE2000, which adds corrections for perceptual non-uniformities that the original 1976 formula missed. According to the ISO 12647-2 printing standard, a Delta E of 5.0 or less is considered acceptable for commercial print quality.

Conversion Formulas: How It Works

RGB to Hex

The simplest conversion. Each RGB channel (0–255) is converted to a two-digit hexadecimal number. RGB(255, 87, 51) becomes #FF5733. No data is lost — this is a purely notational change.

RGB to HSL

RGB to HSL involves normalizing the RGB values to 0–1, finding the min and max, computing lightness as the average of min and max, saturation from the delta, and hue from the dominant channel. The conversion is lossless when using floating-point math but can introduce rounding errors with integer values.

RGB to CMYK

The basic formula converts each channel: C = (1 – R') / (1 – K), where R' = R/255 and K = 1 – max(R', G', B'). However, this naive conversion ignores ICC color profiles and produces inaccurate results for professional print work. For production use, always convert through an ICC profile using tools like Adobe Color or Little CMS.

RGB to CIELAB

This is a two-step conversion: first RGB to CIE XYZ (using a matrix transformation based on the sRGB color space definition), then XYZ to CIELAB (using a non-linear transformation defined by the CIE). The sRGB to XYZ matrix uses the D65 illuminant as the reference white point, as specified in IEC 61966-2-1.

Common Conversion Pitfalls

Gamut Clipping

When converting from a larger gamut (RGB) to a smaller one (CMYK), out-of-gamut colors must be “clipped” to the nearest reproducible color. Different clipping strategies (perceptual, relative colorimetric, absolute colorimetric, saturation) produce different results. Perceptual rendering intent compresses the entire color range proportionally and is usually the best choice for photographs.

Ignoring Color Profiles

An RGB value without a color profile is ambiguous. RGB(200, 50, 50) looks different in sRGB versus Adobe RGB versus Display P3. According to the W3C, sRGB is the default for web content, but modern displays (especially Apple devices) increasingly use the wider Display P3 gamut. CSS Colors Level 4 introduced the color() function to specify non-sRGB colors.

Rounding Errors in Round-Trip Conversions

Converting RGB → HSL → RGB can introduce rounding errors, especially at extreme values. A study by the Colour Science community found that integer-based round-trip conversions produce errors of up to 2 units in each RGB channel. For critical work, use floating-point values throughout the conversion chain.

Convert between any color space instantly

Try the Free Color Space Converter →

Frequently Asked Questions

What is the difference between RGB and CMYK?

RGB (Red, Green, Blue) is an additive color model used for screens — combining all three at full intensity produces white. CMYK (Cyan, Magenta, Yellow, Key/Black) is a subtractive model used for print — combining all four inks produces near-black. A color that looks vibrant in RGB may appear duller in CMYK because CMYK has a smaller gamut (range of reproducible colors).

Why does my color look different on screen versus print?

Screens emit light (additive RGB) while paper reflects light (subtractive CMYK). The RGB gamut is significantly larger than CMYK, meaning many screen colors simply cannot be reproduced in print. Bright neon greens, electric blues, and vivid oranges are especially prone to shifting. Always convert to CMYK and soft-proof before sending designs to print.

When should I use HSL instead of RGB?

Use HSL when you need to adjust a color intuitively. HSL separates Hue (the color), Saturation (intensity), and Lightness (brightness) into independent channels. To make a color lighter, increase the L value. To desaturate it, decrease S. In RGB, achieving the same result requires changing all three channels simultaneously, which is harder to do by hand.

What is CIELAB and why do color scientists use it?

CIELAB (also called L*a*b*) is a color space designed to be perceptually uniform, meaning a given numerical change produces the same perceived visual difference across the entire space. L represents lightness, a represents green–red, and b represents blue–yellow. It is device-independent and used as the reference space for calculating color differences (Delta E) in quality control, printing, and color matching.

Can I convert CMYK to RGB without losing color accuracy?

Converting from CMYK to RGB is generally safe because RGB has a larger gamut — most CMYK colors have an RGB equivalent. However, the conversion is not perfectly reversible. Converting RGB to CMYK and back to RGB may produce a slightly different color due to gamut clipping during the CMYK step. For critical color work, always use ICC color profiles for accurate conversions.