Var-colors are custom properties that allow you to define and use CSS values in a consistent way throughout your website. They are also known as CSS variables or custom CSS properties. Fandom uses var-colors to set the theme colors for different elements of the wiki, such as the header, the page background, the links, and the buttons.
To use var-colors on Fandom, you need to prefix them with --theme- and enclose them in parentheses, like this: var(--theme-color-name). For example, var(--theme-body-background-color) is the background color of the body element to the theme color chosen by the wiki administrator. You can use these just like hex codes in div tags, like setting color: or background-color: to them. E.g:
<div style="color: var(--theme-accent-color)">content to be styled here.</div>
Here is a list of some common var-colors on Fandom and their descriptions:
- →
var(--theme-accent-color) - →
var(--theme-accent-color--hover) - →
rgba(var(--theme-accent-color--rgb), 1.0) - →
var(--theme-accent-dynamic-color-1) - →
rgba(var(--theme-accent-dynamic-color-1--rgb), 1.0) - →
var(--theme-accent-dynamic-color-2) - →
rgba(var(--theme-accent-dynamic-color-2--rgb), 1.0) - →
var(--theme-accent-label-color) - →
var(--theme-alert-color) - →
var(--theme-alert-color--hover) - →
rgba(var(--theme-alert-color--rgb), 1.0) - →
var(--theme-alert-label) - →
var(--theme-body-background-color) - N/A →
var(--theme-body-background-image)- URL to background image, taken from ThemeDesigner, presented as string - →
var(--theme-body-dynamic-color-1) - →
rgba(var(--theme-body-dynamic-color-1--rgb), 1.0) - →
var(--theme-body-dynamic-color-2) - →
rgba(var(--theme-body-dynamic-color-2--rgb), 1.0) - →
var(--theme-body-text-color) - →
var(--theme-body-text-color--hover) - →
var(--theme-border-color) - →
rgba(var(--theme-border-color--rgb), 1.0) - →
var(--theme-link-color) - →
var(--theme-link-color--hover) - →
rgba(var(--theme-link-color--rgb), 1.0) - →
var(--theme-link-dynamic-color-1) - →
rgba(var(--theme-link-dynamic-color-1--rgb), 1.0) - →
var(--theme-link-dynamic-color-2) - →
rgba(var(--theme-link-dynamic-color-2--rgb), 1.0) - →
var(--theme-link-label-color) - →
var(--theme-message-color) - →
var(--theme-message-label) - →
var(--theme-page-accent-mix-color) - →
var(--theme-page-background-color) - →
rgba(var(--theme-page-background-color--rgb), 1.0) - →
var(--theme-page-background-color--secondary) - →
var(--theme-page-dynamic-color-1) - →
var(--theme-page-dynamic-color-1--rgb), 1.0) - →
var(--theme-page-dynamic-color-2) - →
rgba(var(--theme-page-dynamic-color-2--rgb), 1.0) - →
var(--theme-page-text-color) - →
var(--theme-page-text-color--hover) - →
rgba(var(--theme-page-text-color--rgb), 1.0) - →
var(--theme-page-text-mix-color) - →
var(--theme-sticky-nav-background-color) - →
var(--theme-sticky-nav-dynamic-color-1) - →
var(--theme-sticky-nav-dynamic-color-1--rgb) - →
var(--theme-sticky-nav-dynamic-color-2) - →
var(--theme-sticky-nav-dynamic-color-2--rgb) - →
var(--theme-sticky-nav-text-color) - →
var(--theme-sticky-nav-text-color--hover) - →
var(--theme-success-color) - →
var(--theme-success-color--rgb) - →
var(--theme-success-label) - →
var(--theme-warning-color) - →
var(--theme-warning-label)