The palette is finished in the design tool, and now someone has to type twenty hex values into a stylesheet by hand. That is where #2563EB becomes #2563BE, and nobody notices until the brand color looks slightly wrong in production and the hunt for the typo eats an afternoon.

Export exists to remove the typing. Paste the list once, and the CSS comes out ready to paste, in the formats a project actually uses. This guide walks through the export from the free CSS Variable Palette Builder on Ovatly: the three outputs it produces, and the two checks that decide whether an export can be trusted.

Contents

  • Quick answer
  • One paste in, three outputs out
  • Shared names are the point
  • The two checks before you trust an export
  • How to export a palette, step by step
  • Worked example: two lines, three shapes
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion
  • References

Quick answer

Paste your list of colors into the CSS Variable Palette Builder and you get three ready to paste outputs from that single paste: a :root block of CSS custom properties, a Tailwind v4 @theme snippet, and a Tailwind v3 config form, all referencing the same normalized names. Before you copy any of them, read the report of excluded lines and scan the names for numeric suffixes. Fix any problem in the input list and run the builder again, rather than patching the generated CSS.

One paste in, three outputs out

The three outputs serve the three places a palette usually lands. The :root block is the plain CSS form: a set of custom properties that any stylesheet can reference. The Tailwind v4 output is an @theme snippet, the form that version of Tailwind expects its theme values in. The Tailwind v3 output is a config form, matching how that version is set up.

All three are produced from the same list in the same pass. You are not exporting three times or converting between formats by hand; you pick the output your project uses and paste it. If a project later migrates between Tailwind versions, or holds plain CSS and Tailwind side by side, the other outputs are regenerated from the same list rather than translated.

Shared names are the point

Three formats would be a liability if each invented its own names. They do not: every output references the same normalized variable names, built from your names, lowercased into kebab-case, under one shared prefix that defaults to color. The worked example below produces --color-primary and --color-paper in all three shapes.

That sharing is what makes the export worth having. Referencing the variables in Tailwind keeps one source of truth for the palette, dark-mode overrides included, instead of a palette that exists as one set of names in CSS and a second, drifting set inside a config file. When a color changes, it changes in the list, gets re-exported, and every format moves together.

The two checks before you trust an export

An export can look complete and still be wrong in two specific ways, and the builder reports both. Reading those reports is part of the export, not an optional extra.

First, excluded lines. A line without a valid hex value is left out of the output and reported with its line number. The outputs do not fail or shrink noisily; they simply contain one color fewer. If you never read the report, you will discover the missing color later, in the browser, at a worse moment.

Second, suffixed duplicates. If two lines produce the same name after normalization, the builder keeps both colors and gives the duplicate a numeric suffix instead of overwriting the first. The result is valid CSS, so no tool downstream will flag it. A numbered name in the output means your list had a collision, and the export should be regenerated after the list is fixed.

How to export a palette, step by step

  1. Assemble the list with one color per line, in any accepted format: name: #HEX, name #HEX, --name: #HEX with an optional semicolon, or a bare #HEX.
  2. Paste it into the CSS Variable Palette Builder.
  3. Read the report of excluded lines. If a line you wanted was dropped, fix it in the list and paste again.
  4. Scan the output names for numeric suffixes and resolve any collision in the list, not in the output.
  5. Copy the output your project uses, and keep the input list with the project so the palette can be re-exported later.

Worked example: two lines, three shapes

Take the builder's own two-line list:

primary: #2563EB
paper: #FAFAF7

The plain CSS output is this :root block:

:root { --color-primary: #2563EB; --color-paper: #FAFAF7; }

The Tailwind v4 output is an @theme snippet that references the same two variables, --color-primary and --color-paper. The Tailwind v3 output is a config form carrying those same two names. Nothing is renamed between the three shapes, so choosing a format is a decision about where the palette will live, never a translation job, and a reader who learned the names in one format already knows them in the others.

Limitations and honest tradeoffs

The export is only as complete as the lines that parsed. Excluded lines are reported with their line numbers, but the builder cannot know you meant them, and it will not guess a value for a line that has none. Counting the outputs against your list remains a human step.

The export also inherits the quality of your names. It normalizes them into lowercase kebab-case and applies the shared prefix, but it cannot turn a meaningless name into a meaningful one; tidy formatting of a badly named palette is still a badly named palette. Finally, the builder handles the colors you paste and nothing beyond them: it produces the palette block, and the rest of a project's theme lives elsewhere.

Common mistakes

  • Copying the first output without reading the exclusion report. A dropped line stays dropped, and the missing color surfaces later.
  • Editing the generated CSS by hand. The fix evaporates at the next export, or the list and the CSS drift apart. Fix the input list and re-export.
  • Treating a suffixed variable as an intentional second color. The number marks a name collision in your list, not a shade you designed.
  • Deleting the input list after exporting. The generated CSS becomes the only record of the palette, and the next change starts from the wrong end.
  • Retyping hex values somewhere the variables already reach. That recreates the hand-typing errors the export exists to remove.

FAQs

What exactly do I get when I export a palette? Three ready to paste outputs from the same list: a :root block of CSS custom properties for plain CSS, a Tailwind v4 @theme snippet, and a Tailwind v3 config form. All three reference the same normalized names, such as --color-primary and --color-paper in the worked example, so the formats cannot disagree with each other.

One of my colors is missing from the output. Why? Lines without a valid hex value are excluded from the output and reported with their line number. The export does not fail; it just quietly contains one color fewer. Fix the reported line in your pasted list and run the builder again.

Why does one variable name end in a number? Two lines in your list produced the same name after normalization, so the builder kept both and gave the duplicate a numeric suffix instead of overwriting the first. Rename one of the lines so every name is unique, then export again.

I use Tailwind. Do I still need the :root block? The Tailwind snippet references the same variable names as the :root block, and referencing the variables in Tailwind is what keeps one source of truth for the palette, dark-mode overrides included. Keeping the :root block as that source means plain CSS and Tailwind always describe the same colors.

Can I mix input formats in one list? Yes. Each line can be written as name: #HEX, name #HEX, --name: #HEX with an optional semicolon, or as a bare hex value, and 3-digit hex values are normalized to 6 digits. The outputs use the normalized names and values throughout.

Conclusion

A trustworthy export is a short routine: paste once, read the exclusion report, scan for suffixed names, then copy the format your project uses. The CSS Variable Palette Builder produces the :root block and both Tailwind forms on the same names, so the palette stays one thing in every format. If the names themselves are the weak point, our companion guide on organizing CSS color variables with a naming system covers the rules to apply before you paste. For more guides in this series, see our Color and Design Tools guides.

References