Every project accumulates colors the same way: one copied into a comment, one pasted into a chat message, one typed into a second stylesheet from memory. Six months later the site has three blues that were all supposed to be the same blue, and nobody can say which is the real one. The problem is rarely the color. It is the record.

The Color Picker on Ovatly shows why records go wrong. Give it one color and it shows that color as three notations at once: HEX, RGB and HSL. Three spellings means three chances to store the same color three ways, in three places, until the spellings stop agreeing. This guide sets out the discipline that prevents it: one color, one record, one exact notation, under a name that describes the job the color does.

Contents

  • Quick answer
  • One color, three notations, one record
  • Name the job, not the appearance
  • The three notation failure modes
  • How to store a color properly, step by step
  • Worked example: the blue, stored once
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Store each color once, in one place, in one notation: HEX or RGB, because both are always exact in the Color Picker. Read the value from the picker rather than from memory or a screenshot guess, copy it with the notation's Copy button, and file it under a name that describes its job, not its appearance. Treat HSL as the adjustment view, never the record: its whole-number rounding can shift a channel by one unit.

One color, three notations, one record

A color does not have a single natural written form. It has at least three: HEX, the compact code most CSS is written in; RGB, which lists the amounts of red, green and blue; and HSL, which describes hue, saturation and lightness and is the easiest to adjust by eye. The picker displays all three because different tasks call for different spellings.

Storage is not one of those tasks that benefits from variety. A stored record has one job: to be the value everyone copies from, months from now, without wondering whether it is the right one. That demands one exact notation, chosen once for the whole project. HEX and RGB qualify, because in the picker they are always exact. HSL does not, for reasons the failure modes below spell out. Whichever of the exact pair you choose, the record is the only place the color is written down, and every use in every file traces back to it.

Name the job, not the appearance

A stored color needs a name that says what the color is for. A name like primary action describes a role in the interface, and it stays true even if the value underneath it is replaced during a rebrand. A name based on appearance does the opposite: it describes today's value, so the moment the value changes, the name becomes a small lie.

This is not just tidiness: it is the practice the tooling here already assumes. The palette export in this cluster comes out as CSS custom properties, and role-based tokens are the whole territory of the CSS Variable Palette Builder, which turns lists of colors into named tokens. Naming by role makes the store usable: a developer reaching for the action color takes the token named for the action, not the one that looks blue today.

The three notation failure modes

Most color drift traces back to three storage mistakes, all of them notation failures rather than design failures.

The first is storing the rounded HSL as the record. HSL values in the picker are rounded to whole numbers, and converting them back can differ by one unit in a channel. One unit is invisible, but the stored record is now a neighbour of the color that was actually picked, and every copy made from it spreads the neighbour. The second is storing a guess: a value read off a screenshot with an eyedropper, or typed from memory, and filed without ever being verified. The guess may be close, but close is not the color. The third is duplication: the same color stored under two names, in two notations, in two files. Each record looks authoritative, so each gets copied, and the first time someone updates one of them, the project ships both versions.

How to store a color properly, step by step

  1. Open the Color Picker and enter the color, with the swatch or by typing its HEX value.
  2. Read the three notations it reports: HEX, RGB and HSL.
  3. Choose your project's record notation, HEX or RGB, and copy that value with its Copy button rather than retyping it.
  4. Give the color a role name and store the value once, under that name, in the one place your project keeps its colors.
  5. Check the contrast ratios against black and white, and note beside the record where the color may be used as text.

Worked example: the blue, stored once

Take the blue #2563EB, the color of the main button, the primary action. Entered in the picker, it reads three ways: rgb(37, 99, 235) and hsl(221, 83%, 53%), alongside the HEX. Stored properly, it is written down once, in the record notation, under its role name:

:root {
  --color-primary-action: #2563EB;
}

The record is the HEX, because HEX is exact. The RGB line is the same color in the other exact spelling, available if a file needs it, but it is not a second record. The HSL line is deliberately not stored: it is what you would open to adjust the blue, keeping the hue at 221 and tuning saturation or lightness, after which the new exact HEX replaces the old one in this same record. The contrast ratios complete the entry: at 5.17:1 against white the blue passes the AA minimum of 4.5:1 for normal text, and at 4.06:1 against black it fails, so the record notes that this action color sits on light backgrounds.

Limitations and honest tradeoffs

The picker shows one color at a time, so this discipline is applied per color: there is no bulk import that files a whole palette for you, and a large project builds its store one verified color at a time. The picker also displays three notations and only three; the swatch is your operating system's picker, which may offer formats the page does not display, and those cannot serve as the record because the project cannot verify them in the same place. Finally, the rule only works if everyone follows it: the record stays the single source only while new colors arrive through the picker, not pasted in from wherever they were found.

Common mistakes

  • Storing the HSL line as the record. It is rounded to whole numbers and can drift by a unit per channel. Store HEX or RGB.
  • Naming colors by appearance. A name that describes how a color looks becomes wrong the day the value changes. Name the job instead.
  • Filing an eyedropper guess from a screenshot. Verify the sampled value in the picker first, and store the exact notation the picker reports.
  • Keeping the same color in two files under two names. Two records drift the first time only one is updated. Store it once.
  • Writing values from memory. A remembered hex is a guess with confidence. Read it in the picker and copy it.

FAQs

Should I store my colors as HEX or RGB? Either: HEX and RGB are both always exact in the Color Picker, so both are safe as the record. Pick one notation for the whole project and use it consistently, so the same color is never written two ways in two files.

Why should I not store the HSL value as the record? HSL is rounded to whole numbers, and converting it back can differ by one unit in a channel. That makes it a good adjustment view and a bad archive. Adjust in HSL if you like, then read the exact HEX or RGB and store that.

How should I name a stored color? Name the job, not the appearance. A name like primary action still describes the color's role if the value is replaced next year, while a name based on how the color looks stops making sense the moment the value changes. Role-based tokens are what palette tooling expects.

What goes wrong when the same color is stored under two names? The two records drift: someone updates one, the other keeps the old value, and the project ships two slightly different colors that were supposed to be one. Store each color once, in one notation, under one role name.

How do I store a color I sampled from a screenshot? Do not store the eyedropper guess as it stands. Enter the sampled value in the Color Picker, read the exact HEX, RGB and HSL it reports, and store the HEX or RGB from the picker. The picker becomes the single place every project color was verified.

Conclusion

Storing colors well is unglamorous and mechanical: verify each color in the Color Picker, record one exact notation under a role name, and let that record feed every use. The step before storage, turning a raw sample into a clean CSS value, is covered in How to Build a CSS Color From a Picked Sample. For more guides in this series, see the Color and Design Tools guides.