A color handoff looks like the smallest task in a web project: copy a value, paste it into a message, done. Yet the value can travel in three shapes, HEX, RGB or HSL, and the shape decides how the developer can use it. One shape is compact and matches the stylesheet. One shape exposes the channels separately. One shape looks friendly and quietly stops being exact.

The Color Picker on Ovatly shows all three notations for one color at once, each with its own Copy button: a good place to settle the question. The verdict follows from the picker's own definitions: HEX and RGB are both always exact, so the choice is about the reader. HSL, the easiest to adjust by eye, is the one to leave out.

Contents

  • Quick answer
  • Same color, two exact writings
  • The case for HEX: brevity and shared labels
  • The case for RGB: channels on their own
  • Why HSL loses the handoff
  • How to read both notations, step by step
  • Worked example: handing over one blue, both ways
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Hand over HEX for ordinary web work: it is the compact code CSS is written in, and it matches the labels on design-tool swatches. Hand over RGB when the developer needs the channels separately, for example when one channel must change while the other two stay fixed. Do not hand over HSL read from the Color Picker as the record of a color: those figures are rounded to whole numbers, and converting them back can differ by one unit in a channel.

Same color, two exact writings

HEX and RGB are not two colors or two qualities of color. They are two writings of one thing. HEX packs the red, green and blue amounts into a compact code, the code CSS is written in. RGB writes the same amounts out as a list, each channel visible on its own. In the picker, both are always exact, meaning either one, entered anywhere, reproduces the color perfectly.

That equivalence is what makes the handoff question a practical one rather than a technical one. Nothing is gained or lost in accuracy when you pick HEX over RGB. What changes is how the value reads and whether the reader can pull one channel out without unpacking the others.

The case for HEX: brevity and shared labels

HEX is one short token. It fits in a subject line, a commit message or a chat message without wrapping, and there is nothing to misalign: no commas, no ordering to remember beyond the code itself. It is also the label both sides of the handoff already see. Design tools present their swatches with HEX codes, and CSS is written in HEX, so the value the designer copies is character-for-character the value the developer pastes into the stylesheet.

When a project has dozens of colors, that shared label matters. A palette written in HEX can be searched in the codebase, matched against the design file, and checked in the picker, all as the same string. Consistency of labels is a real form of accuracy, even though the underlying numbers were never in doubt.

The case for RGB: channels on their own

RGB wins when the work is about channels rather than labels. The notation lists red, green and blue as separate amounts, so any single channel can be lifted out, compared or changed while the other two stay exactly where they were. A developer who needs to warm a color by raising the red channel works faster from the list than from the packed code.

RGB is also the clearer format for talking about a color with someone who thinks in amounts. "Red at 37, green at 99, blue at 235" says what the color is made of; the HEX code says the same thing in a form that has to be decoded first. When the conversation is about composition rather than placement, send the list.

Why HSL loses the handoff

HSL is genuinely useful, and the picker shows it for a good reason: keeping the hue and tuning saturation and lightness is how people explore a color family by feel, and it is the easiest notation to adjust by eye.

The problem is precision. The HSL figures in the picker are rounded to whole numbers. That rounding is invisible while you adjust, but the HSL triple is an approximation, not a record: converting it back can differ by one unit in a channel. One unit will rarely be visible, yet a handoff is a record, and records should not drift at all. Use HSL at your own desk, for exploration. File and send HEX or RGB.

How to read both notations, step by step

  1. Open the Color Picker and enter the color with the swatch, or type its HEX value.
  2. Read the HEX and RGB lines side by side and confirm they describe the color in the preview.
  3. Decide by the reader: stylesheet or design annotation means HEX; channel work means RGB.
  4. Copy the chosen notation with its own Copy button instead of retyping it.
  5. Note the contrast ratios against white and black and include them in the handoff.
  6. Keep the project's own record in the same notation you sent, so the file and the stylesheet cannot drift apart.

Worked example: handing over one blue, both ways

The picker's example color is the blue #2563EB. As a HEX handoff it travels as that single code, ready to paste into CSS or match against a design-file swatch. As an RGB handoff it travels as rgb(37, 99, 235): the same blue with its channels exposed, ready for any adjustment that touches one channel at a time. Its HSL reading, hsl(221, 83%, 53%), stays behind at the designer's desk, because it is the rounded one.

A complete handoff adds one more pair of numbers. This blue's contrast is 5.17:1 against white, which passes the WCAG AA minimum of 4.5:1 for normal text, and 4.06:1 against black, which does not. Sending those verdicts with the value tells the developer, before any layout is written, that the blue can carry text on light backgrounds and should not be asked to carry it on black.

Limitations and honest tradeoffs

This choice only covers the two exact notations. The picker also displays HSL, with the rounding described above, and not formats such as CMYK, which an operating system picker may offer for print; print handoffs are a different conversation. Nor does the right notation guarantee the right rendering: two screens can show the same exact value slightly differently, a display problem no format choice can fix.

Common mistakes

  • Sending HSL as the permanent record. Rounded figures can return a channel one unit off. Record HEX or RGB.
  • Retyping the code from a screenshot. Screenshots invite transcription errors. Copy from the picker with its Copy button.
  • Mixing notations across a project. Half a palette in HEX and half in RGB makes searching and matching harder. Pick one house notation.
  • Sending the value with no context. A bare code does not say where the color may sit. Add the contrast verdicts against white and black.
  • Assuming RGB is more accurate than HEX. Both are always exact. The difference is readability, not truth.

FAQs

Are HEX and RGB equally accurate? Yes. In the Color Picker, HEX and RGB are always exact: they are two writings of the same color. Choosing between them is about who reads the value and what they do with it, never about one being truer than the other.

When should I hand over RGB instead of HEX? When the developer needs the channels separately, for example when one channel has to change on its own while the other two stay fixed. RGB lists the three amounts separately, so one channel can be edited without unpacking a compact code.

Why not hand over the HSL values? Because the HSL figures shown here are rounded to whole numbers. Converting them back can differ by one unit in a channel, so an HSL triple read from this page is a working approximation, not a record. Keep the brand color on file as HEX or RGB.

Which notation do design tools use? Design tools present colors as swatches labeled with HEX codes, and CSS is written in HEX, so a HEX handoff matches what both the designer and the stylesheet already show. That shared label is what makes HEX the low-friction default.

What should a complete color handoff include besides the value? Add the contrast verdicts. The Color Picker shows the color's contrast ratio against white and against black: the blue in this guide measures 5.17:1 against white, which passes the WCAG AA minimum of 4.5:1 for normal text, and 4.06:1 against black, which does not. Those two numbers tell the developer where the color can and cannot sit.

Conclusion

HEX and RGB are both exact, so you choose by reader and by task. HEX for the stylesheet and the swatch label, RGB for channel work, HSL for your own adjustments and never for the record. The Color Picker shows all three, so the choice takes seconds. When the same exact color still looks different on a colleague's screen, that is the other half of the problem, covered in Color Code Mistakes. More guides in this series live in our Color and Design Tools guides.