Web Design

Color Models Explained: HEX, RGB, HSL, HSV

Understand the different color models used in web design and digital media, including HEX, RGB, HSL, and HSV, and learn which model is best for different design tasks.

By Inventive HQ Team

Introduction to Color Models

Color models describe colors with coordinates. Screens combine red, green, and blue light; 0–255 channel values are common in 8-bit sRGB. CSS hex notation encodes sRGB channels in base-16, while HSL (hue, saturation, lightness) and HSV/HSB (hue, saturation, value) rearrange RGB values into hue-based coordinates. Which one you reach for depends on the task: HEX and RGB for sharing and code, HSL for adjustable CSS, and HSV when a design tool offers that picker. Neither HSL nor HSV is perceptually uniform.

That's the summary an AI Overview will give you. What it can't give you is the intuition — why RGB is a cube and HSL/HSV are cylinders, why the "same" pure red lives at 50% lightness in one model and 100% value in another, and which model quietly makes your palette work harder. This guide covers all of that, with a diagram, a decision table, and a live converter you can experiment with.

Models vs. syntax: This post is about the color models — the underlying theory and geometry. If you instead want the practical CSS syntax questions (rgb() vs hsl() vs oklch(), alpha channels, gamut, and which format to type in 2026), read the companion guide: What are CSS color formats and which should I use.

The Core Intuition: A Cube and a Cylinder

The single most useful mental model is geometric. RGB is a cube. HSL and HSV use cylindrical coordinates. Within a chosen RGB color space, channel values locate a color in a 3-axis box (how much red, green, blue). HSL and HSV re-arrange RGB values around a wheel so you can adjust hue and channel values: which color (hue, the angle), how intense (saturation, the radius), and the model's lightness or value (the height). The cylinder in the diagram simplifies the shape of the valid colors; neither vertical axis measures perceived brightness.

RGB cube versus HSL and HSV cylinder The RGB cube stores color as red, green and blue axes; HSL and HSV re-map the same colors onto a cylinder where angle is hue, radius is saturation, and height is lightness or value. Same colors, two geometries

RGB — a cube

R G B 0–255 in 8-bit sRGB notation

→ remap

HSL / HSV — a cylinder

hue = angle height = L or V radius = saturation

The catch that trips people up: HSL and HSV are not the same cylinder. They use the same hue angle but define saturation and the vertical component differently, covered below.

Quick Comparison: Which Model, Which Job

ModelFull nameComponents (range)Notation exampleNative toCSS supportBest for
RGBRed, Green, BlueR, G, B (0–255 in this 8-bit sRGB example)rgb(152, 78, 201)Screens / displaysYesCode, programmatic color
HEXHexadecimal sRGB notation3 or 6 hex digits; 4 or 8 with alpha#985EC9Web / CSSYesCompact CSS, sharing colors with developers
HSLHue, Saturation, LightnessH (0–360°), S, L (0–100%)hsl(276, 53%, 55%) (approx.)Cylindrical RGB remappingYesReadable CSS, palettes, lighter/darker variants
HSV / HSBHue, Saturation, Value/BrightnessH (0–360°), S, V (0–100%)hsv(276, 61%, 79%) (approx.)Cylindrical RGB remappingNo (convert first)Design-tool color pickers, artist workflows

The short version: CSS hex and rgb() can encode the same sRGB color; HSL and HSV are two cylindrical remappings of RGB values. Pick HEX/RGB for commonly shared CSS colors, HSL when you're building or adjusting palettes in CSS, and HSV when you're inside a design app's color picker.

Try It: Live Color Converter

Use the visual HSV picker or RGB sliders to change the color. The displayed HEX, RGB, HSL, and HSV values update as you adjust it, showing how the models relate.

Interactive toolColor PickerRuns in your browser — nothing is uploaded.

RGB Color Model

RGB stands for Red, Green, Blue. It's an additive color model where colors are created by combining red, green, and blue light in different intensities.

In common 8-bit sRGB notation, each red, green, and blue channel has a value from 0 to 255. RGB color spaces can use other numeric ranges and different primaries. The colors a screen can reproduce depend on its gamut and color management.

For example, pure red is RGB(255, 0, 0), pure green is RGB(0, 255, 0), pure blue is RGB(0, 0, 255), white is RGB(255, 255, 255), and black is RGB(0, 0, 0).

Screens generally create colors by combining red, green, and blue light. The RGB numbers used in a file or CSS value need a color space and color management to determine how they appear on a particular display.

Advantages of RGB

RGB is useful for understanding how screens combine red, green, and blue light, although channel numbers alone do not guarantee the same appearance across displays.

RGB is easy to work with programmatically. Being numeric values, RGB colors are simple to manipulate with code.

RGB is widely supported. Nearly all color tools, design software, and code support RGB.

Disadvantages of RGB

RGB is not intuitive for human color selection. Most people don't think about color in terms of red, green, and blue proportions. It's difficult to mentally visualize what RGB(152, 78, 201) will look like.

RGB makes certain color tasks harder. Creating a color scheme where colors are slightly lighter or darker isn't intuitive in RGB. Want to make a color 10% lighter? RGB doesn't directly support that concept.

RGB doesn't clearly represent color perception. Two colors with similar RGB values might look quite different to humans, and vice versa.

Advertisement

When to Use RGB

Use RGB when working with code and web development. Most CSS and JavaScript color specifications accept RGB.

Use RGB when interfacing directly with screen technology or working with video and digital media.

Use RGB when you need numeric precision or programmatic color manipulation.

HEX Color Model

CSS hex notation represents sRGB colors with a hash symbol followed by three or six hexadecimal digits, or four or eight digits when an alpha channel is included.

In six-digit hex notation, the first pair represents red (00–FF), the next green, and the last blue. Three-digit notation uses one digit per channel and expands each digit by repetition (for example, #F00 becomes #FF0000). Four- and eight-digit forms add an alpha value for transparency.

For example, pure red is #FF0000, pure green is #00FF00, pure blue is #0000FF, white is #FFFFFF, and black is #000000. The color in our earlier RGB example, RGB(152, 78, 201), would be #985EC9 in HEX.

For opaque sRGB colors with 8-bit channels, six-digit hex and the corresponding integer rgb() values encode the same channel data. Four- and eight-digit hex forms can also encode transparency.

Advantages of HEX

HEX is compact. Representing colors in HEX notation is shorter and more convenient than writing RGB(255, 0, 0).

HEX is the standard in web development. HEX has been the traditional color format for HTML and CSS for decades, making it the de facto standard.

CSS hex colors are widely supported in web browsers and color tools.

HEX is easy to copy and paste. The compact format makes it easy to share color specifications.

Disadvantages of HEX

HEX is less intuitive than RGB for most people. Hexadecimal notation is not something people naturally use.

HEX is not more intuitive than RGB for color selection or manipulation. Like RGB, HEX doesn't directly represent human perception of color.

HEX readability can be challenging. Looking at #985EC9, it's not immediately obvious what color that represents.

When to Use HEX

Use HEX in CSS and HTML. This is the traditional standard for web colors and is what most CSS designers have used for years.

Use HEX when creating color palettes to share with developers. Developers expect HEX notation.

Use HEX when you need a compact notation for colors.

Use HEX in color picking tools where you need to display colors in a standard format.

HSL Color Model

HSL stands for Hue, Saturation, Lightness. It separates three useful controls for adjusting RGB colors, though its numeric steps do not match equal changes in human color perception.

In HSL, a color is specified by three components:

Hue is the color itself, represented as an angle on a color wheel from 0 to 360 degrees. 0 is red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 is magenta.

Saturation is the intensity of the color, represented as a percentage from 0 to 100%. 0% means the color is completely desaturated (gray), 100% means the color is fully saturated.

Lightness runs from 0% (black) to 100% (white). At 50%, a color with 100% saturation is a fully saturated hue; Lightness is not a measure of perceived brightness.

For example, pure red is HSL(0, 100%, 50%), a lighter red might be HSL(0, 100%, 70%), a darker red might be HSL(0, 100%, 30%), and a desaturated red might be HSL(0, 50%, 50%).

Advantages of HSL

HSL separates hue, saturation, and lightness, which can make certain color adjustments easier to describe than RGB channel changes. Equal changes in HSL values can still look uneven across different hues.

HSL makes some color tasks straightforward. Increase Lightness to move toward white, decrease Saturation to move toward gray, or adjust Hue to rotate around the color wheel. Check the visual result and contrast when making a palette.

HSL is excellent for creating color harmonies. Because hue is on a 360-degree wheel, creating complementary colors (opposite on the wheel), analogous colors (adjacent on the wheel), and triadic colors (equally spaced around the wheel) is straightforward.

HSL can simplify generating related colors, though matching HSL values do not guarantee consistent perceived brightness or contrast.

Disadvantages of HSL

HSL is less familiar to many developers. While gaining popularity, many developers are more familiar with RGB/HEX.

HSL doesn't directly match how screens work. While RGB is the native color model for screens, HSL is an abstraction.

HSL readability can be challenging. Looking at HSL(240, 75%, 50%), the specific color isn't immediately obvious.

When to Use HSL

Use HSL when designing color schemes that vary by hue, saturation, or lightness. Review the resulting colors visually and check their contrast.

Use HSL in CSS when you want readability and flexibility. Modern CSS supports HSL, and using HSL in CSS makes color values more meaningful.

Use HSL when creating lighter or darker color variations, then check whether those variations look balanced and remain accessible.

Use HSL in design tools and color pickers that offer its hue, saturation, and lightness controls.

Use HSL for programmable color changes where you want to adjust specific color attributes.

HSV Color Model

HSV stands for Hue, Saturation, Value. It's similar to HSL but uses a different model for lightness/brightness.

In HSV, components are:

Hue is the same as in HSL, an angle from 0 to 360 degrees representing the color itself.

Saturation measures the spread between the strongest and weakest RGB channels relative to Value. Its percentage generally differs from HSL saturation for the same color.

Value is the maximum of the RGB channels, from 0 to 100%. It is not a measure of perceived brightness.

HSV differs from HSL in how it represents brightness. In HSL, a color's pure form is at 50% lightness, and increasing lightness beyond that moves toward white. In HSV, pure color is at 100% value, and you don't have a separate white point.

For example, pure red is HSV(0, 100%, 100%), a darker red is HSV(0, 100%, 50%), and a desaturated red is HSV(0, 50%, 100%).

Advantages of HSV

HSV can be convenient in tools that offer hue, saturation, and value controls, particularly when adjusting a color through a picker.

HSV is excellent for color picker interfaces. HSV maps naturally to the typical color picker interface with a color wheel and a saturation/value square.

HSV is available in some design software, often labeled HSB. Check the controls in the tool you use.

Disadvantages of HSV

HSV is less intuitive for web developers. Most web color work uses RGB or HSL.

HSV is not supported directly in CSS. Web developers must convert HSV to RGB or HSL for use in stylesheets.

HSV doesn't have a clear advantage over HSL for many web design tasks. HSL is directly available in CSS, while HSV values need conversion.

When to Use HSV

Use HSV in design tools and color pickers that provide HSV or HSB controls.

Use HSV when you're primarily working in design applications that use HSV natively.

Use HSV when creating color picker interfaces. HSV maps naturally to typical color picker UI patterns.

Choosing Which Color Model to Use

The choice of color model depends on your context and task:

For web development in CSS, use HEX for compatibility or HSL for readability and flexibility. Modern CSS supports both well.

For design work, use the color controls your tool provides. If you choose HSV or HSB values, convert them to a CSS-supported format for web use.

For creating color schemes and harmonies, HSL can provide a convenient starting point; check perceived balance and contrast afterward.

For JavaScript and programmatic color work, use RGB because it's numerically convenient, or use HSL if you need human-friendly adjustments.

For sharing colors with developers, use HEX as the standard format.

For screen color matching, specify the intended color space and account for display gamut and color management; choosing RGB numbers alone does not guarantee an identical appearance across screens.

Understanding the strengths and weaknesses of each color model allows you to choose the most appropriate one for your task, making your color work more efficient and your colors more accurate.

More in This Series

Frequently Asked Questions

What is the difference between HSL and HSV?

HSL and HSV share a hue wheel but define their vertical components differently. HSV's Value is the maximum of the R, G, B channels, so a pure, fully saturated color sits at Value 100%. HSL's Lightness is the average of the highest and lowest channels, so that same pure color sits at Lightness 50% — and pushing Lightness above 50% blends toward white. With HSV saturation above 0%, changing Value alone does not reach white; at HSL Lightness 100% the result is white, and at 0% it is black, regardless of hue.

Is HEX the same as RGB?

CSS hex notation encodes sRGB channel values in hexadecimal. For example, #FF0000 and rgb(255, 0, 0) specify the same sRGB red. Six-digit hex uses pairs for red, green, and blue; three-digit hex is shorthand, while four- and eight-digit forms add an alpha channel. CSS rgb() can also specify transparency. Neither notation alone determines how the color will appear on every display.

Is HSV the same as HSB?

Yes — HSV and HSB are two names for the exact same model. The V stands for Value and the B stands for Brightness, but they compute identical numbers. If a design tool shows HSB and your code expects HSV, no conversion is needed; just match the fields in H, S, V/B order. Photoshop and many image editors label it HSB, while programming libraries and color pickers usually call it HSV.

What are the four main color models used in web and digital design?

HEX, RGB, HSL, and HSV are common ways to describe digital colors, although HEX is a notation rather than a separate color model. Screens combine red, green, and blue light; 0–255 channels are a common 8-bit sRGB representation, not a limit of every RGB color space. CSS hex encodes sRGB channels in hexadecimal. HSL (hue, saturation, lightness) and HSV/HSB (hue, saturation, value) are cylindrical remappings of RGB that can make some color adjustments easier. Their lightness and value numbers do not measure perceived brightness. CMYK is another model used for print.

Which color model is best for web development?

Use HEX or rgb() for compatibility and copy-paste sharing, and HSL when you want readable, adjustable values in CSS — HSL lets you tweak lightness and saturation without recalculating hex codes. HSV is not supported directly in CSS, so convert it to HEX, RGB, or HSL first. For wide-gamut modern displays, newer CSS formats like oklch() go further, which is covered in our CSS color formats guide.

Why do designers use HSL instead of RGB?

HSL separates hue, saturation, and lightness, so it can be convenient for making related CSS colors. Raising Lightness moves a color toward white, lowering Saturation moves it toward gray, and changing Hue rotates around a color wheel. These adjustments are easier to express than equivalent RGB channel changes, but equal HSL steps do not necessarily look equally large or produce consistent perceived brightness. Hue offsets can be starting points for complementary, analogous, or triadic palettes; check the results visually and for contrast.

What color model do computer screens actually use?

Screens produce color by combining red, green, and blue light. CSS hex and HSL describe colors that browsers process for display; HSV is commonly used in design tools and must be converted to a CSS-supported format for web pages. The displayed result also depends on the color space, display gamut, and color management.

Can you convert between HEX, RGB, HSL, and HSV?

Yes. Six-digit HEX and 8-bit RGB express the same channel values exactly. RGB can also be converted to HSL or HSV and back using standard formulas, but rounded hue, saturation, or lightness/value values can change the RGB result on a round trip. Keep enough precision if an exact match matters.

color modelsHEXRGBHSLHSVweb design