Short answer: 82% read a color through var(), and the median site defines 47 color variables
How many websites use CSS variables for color?
82% of the 996 most-linked home pages that Recolor (recolor.page) measured on October 8, 2026 read at least one color through var(), and on the median site 32% of the color declarations do. The measurements come from the colors of the web 2026 study, which analyzed the stylesheets of top websites to see how web developers write CSS.
Last updated
| Share of the color declarations through var() | Share of the sites | Sites |
|---|---|---|
| None | 18% | 182 |
| Under 20% | 24% | 243 |
| 20% to 40% | 12% | 115 |
| 40% to 60% | 11% | 109 |
| 60% to 80% | 16% | 164 |
| 80% or more | 18% | 183 |
How many sites read a color through var()
814 of the 996 sites, or 82%, have at least one color declaration whose value holds
var(). On the median site, 32% of the color declarations read a variable. Counted across all
the sites together in a pooled total, 38% of all color declarations use var().
A color declaration is any color property or custom property with a color in it, as the
methodology defines it. This includes standard properties such
as color, background-color, and border-color, alongside custom properties that assign color values. The count
captures any place where a stylesheet uses the CSS var() function to retrieve a stored value rather than
writing a raw color directly.
How much of each site's color goes through var()
The sites split into two camps in how heavily they rely on custom properties. 18% of the sites read
no color through var() at all, while 24% send under a fifth of their colors through it.
At the other end of the distribution, 18% of the sites read 80% or more of their colors through var().
These are the sites built on a theme of variables from the start, where design tokens drive the entire
interface. For instance, Tailwind CSS v4 writes its whole palette as variables, and the study of Tailwind
adoption found it on 20% of the sites. You can
inspect examples among websites built with Tailwind CSS.
Share of sites, by the share of their color declarations that read var()
The numbers
| Declarations reading var() | Sites | Share |
|---|---|---|
| None | 182 | 18% |
| Under 20% | 243 | 24% |
| 20% to 40% | 115 | 12% |
| 40% to 60% | 109 | 11% |
| 60% to 80% | 164 | 16% |
| 80% or more | 183 | 18% |
How many color variables a site defines
792 of the sites, or 79%, define at least one custom property that holds a color. The median site defines 47 color variables in its CSS. A quarter of the sites define 3 or fewer, a quarter define 148 or more, and the most found in the study was 1,908.
In addition to standard color values, 16% of the sites keep colors as bare channel numbers for
rgb() or hsl() to read, as Shopify and Wix themes do, such as --background: 255, 255, 255. This pattern
allows stylesheets to apply opacity modifiers by wrapping the variable in a color function. How each site
writes its colors is documented in the OKLCH adoption study table of
notations.
What the count cannot see
The study read each home page once, with scripts off, from the CSS text as the page wrote it. Variables a script sets at run time are not counted in the data, and neither is any other page of the site beyond the home page. Deep application views, user dashboards, and dynamic theme switchers managed entirely through JavaScript stay outside this initial stylesheet parse.
The full record of numbers for every scanned domain is publicly available. The study dataset download lists every site's share of variables alongside its raw counts.
What variables mean for changing a site's colors
A site whose colors are variables can change its palette in one place, which the guide to recoloring with CSS variables shows in detail. When color tokens sit at the root of a document, updating a few values rethemes the entire interface instantly without touching individual selector rules.
Recolor does not need a website to use custom properties in advance. When a page loads, Recolor explains in
how it works that it gives each exact color its own variable and points every
declaration at it. Through color mapping, a palette repaints sites with variables and
without. For a Tailwind v4 site, the guide to theme colors
turns a palette into @theme variables. You can open the Recolor app, load a site, and press Space to
test new palettes live.
Common questions
Do most websites use CSS variables for color?
Yes. 82% of the most-linked home pages read at least one color through var().
Do most sites send all their colors through variables?
No. On the median site 32% of the color declarations read var().
Does the median site define many color variables?
Yes. It defines 47 custom properties that hold a color.
Did the study count variables set by scripts?
No. It read the CSS with scripts off, so variables a script sets are not counted.
Does Recolor need a site to use CSS variables?
No. It gives every color its own variable when the page loads, so any site can take a palette.
Can I use the data?
Yes. The dataset is licensed CC BY 4.0; credit Recolor and link the study.
Sources
- Recolor's colors of the web 2026 study recolor.page
- Recolor's guide to recoloring a website with CSS variables recolor.page