The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to find where theme's colors and variants are stored

DJ Wolfson
Kilo Sage

I'm currently working on building some HTML outside of my Workspace for a report and wanted to match the styling of the colors used for the Highlighted Value component. So far, I've managed to find the CSS variables are stored within my Workspace's selected theme (Polaris) which has a sys_ux_style record called 'Colors' but this is where I've gotten stumped.

The "base" section of the record seems to store the unaltered colors before things like colorVariant are applied. I'd like to at least get the CSS values for the Tertiary variants of these colors, but I can't seem to find them within this record.

Is there a better way to find this type of data?

1 ACCEPTED SOLUTION

Juhi Poddar
Kilo Patron

Hello @DJ Wolfson 

To retrieve the color code for the desired CSS variables:

  • Navigate to the sys_ux_theme_property table.
  • Apply a filter for CSS custom properties. JuhiPoddar_0-1738987586908.png

     

  • Locate the or Inherits column and open the referenced record.JuhiPoddar_1-1738987635840.png

     

  • The Default value displayed on the form/list represents the RGB color code.

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar

View solution in original post

3 REPLIES 3

Juhi Poddar
Kilo Patron

Hello @DJ Wolfson 

To retrieve the color code for the desired CSS variables:

  • Navigate to the sys_ux_theme_property table.
  • Apply a filter for CSS custom properties. JuhiPoddar_0-1738987586908.png

     

  • Locate the or Inherits column and open the referenced record.JuhiPoddar_1-1738987635840.png

     

  • The Default value displayed on the form/list represents the RGB color code.

Hope this helps!

 

"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"

 

Thank You
Juhi Poddar

Hi @Juhi Poddar thanks for the quick response. This was exactly what I was looking for!

Ken_Tryon
Tera Contributor

Is it possible to access color values as variables within an HTML page? I want to be able to switch colors in an article based on the current theme.

 

kt