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()vshsl()vsoklch(), 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.
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
| Model | Full name | Components (range) | Notation example | Native to | CSS support | Best for |
|---|---|---|---|---|---|---|
| RGB | Red, Green, Blue | R, G, B (0–255 in this 8-bit sRGB example) | rgb(152, 78, 201) | Screens / displays | Yes | Code, programmatic color |
| HEX | Hexadecimal sRGB notation | 3 or 6 hex digits; 4 or 8 with alpha | #985EC9 | Web / CSS | Yes | Compact CSS, sharing colors with developers |
| HSL | Hue, Saturation, Lightness | H (0–360°), S, L (0–100%) | hsl(276, 53%, 55%) (approx.) | Cylindrical RGB remapping | Yes | Readable CSS, palettes, lighter/darker variants |
| HSV / HSB | Hue, Saturation, Value/Brightness | H (0–360°), S, V (0–100%) | hsv(276, 61%, 79%) (approx.) | Cylindrical RGB remapping | No (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.
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.
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.