Convert Vanilla Bricks Colors into CSS variables

The colors created in Bricks aren't typically saved as CSS Variables; they're primarily static values. But, if you're keen on enjoying the convenience of CSS variables, guess what? You're simply a button tap from utilizing our color variable converter.

The initial issue

Our goal is to leverage the benefits from the CSS variables, while most of the vanilla Bricks are set statically. It's easy to create new colors inside the Color Manager that generate reusable CSS variables, but what about our existing palettes set previously in Bricks? Copy/paste all the colors manually one by one isn't an option. So we created a converter that will take all the pain away!

How to activate it

Go to the Theme SettingsGlobal SettingsGeneral TabToggle on "Global Colors"

Initial Release Date

September 7, 2023

Last Modification

April 14, 2025

Official Videos

No Video found.

Content Creators Videos

No Video found.

Documentation

The idea behind this feature is to allow you to quickly and easily transform your existing palettes created with Bricks into reusable CSS variables and leverage all the corresponding benefits of dynamic data applied to CSS values.

Where can I find it inside the builder?

The converter is visible inside the Class Manager when hovering a static color created using the Vanilla Bricks Palette. You can easily recognize the static colors inside the Color Manager: they are slightly grayed compared to the other ones, and contain a unique icon when hovered:

Here is how it looks inside the native color popup:

How does it work?

When you click on the converter icon, the following steps are automated:

  • a CSS variable is created based on the Color Name and AT will take care of enqueuing it on frontend
  • The actual HEX/RGB/HSL value is assigned to the variable
  • The static value is removed from the color object

Once the color has been converted, you get access to all the advanced features provided by the Color Manager:

… here is how it looks now in the native color popup:

Note that the color is exactly the same, but now you’re using a dynamic value and you can easily manage it inside the Color Manager.

More Features in the Colors category:

You won't build websites without it anymore!