Color Utilities

The color utilities provide a set of classes to adjust the color and background properties of elements.

Background Color

Class NamePropertyValue
.bg-primarybackground, --graupl-backgroundvar(--graupl-theme-active--primary)
.bg-primary-100background, --graupl-backgroundvar(--graupl-theme-active--primary--100)
.bg-primary-200background, --graupl-backgroundvar(--graupl-theme-active--primary--200)
.bg-primary-300background, --graupl-backgroundvar(--graupl-theme-active--primary--300)
.bg-primary-400background, --graupl-backgroundvar(--graupl-theme-active--primary--400)
.bg-primary-500background, --graupl-backgroundvar(--graupl-theme-active--primary--500)
.bg-primary-600background, --graupl-backgroundvar(--graupl-theme-active--primary--600)
.bg-primary-700background, --graupl-backgroundvar(--graupl-theme-active--primary--700)
.bg-primary-800background, --graupl-backgroundvar(--graupl-theme-active--primary--800)
.bg-primary-900background, --graupl-backgroundvar(--graupl-theme-active--primary--900)
.bg-secondarybackground, --graupl-backgroundvar(--graupl-theme-active--secondary)
.bg-secondary-100background, --graupl-backgroundvar(--graupl-theme-active--secondary--100)
.bg-secondary-200background, --graupl-backgroundvar(--graupl-theme-active--secondary--200)
.bg-secondary-300background, --graupl-backgroundvar(--graupl-theme-active--secondary--300)
.bg-secondary-400background, --graupl-backgroundvar(--graupl-theme-active--secondary--400)
.bg-secondary-500background, --graupl-backgroundvar(--graupl-theme-active--secondary--500)
.bg-secondary-600background, --graupl-backgroundvar(--graupl-theme-active--secondary--600)
.bg-secondary-700background, --graupl-backgroundvar(--graupl-theme-active--secondary--700)
.bg-secondary-800background, --graupl-backgroundvar(--graupl-theme-active--secondary--800)
.bg-secondary-900background, --graupl-backgroundvar(--graupl-theme-active--secondary--900)
.bg-tertiarybackground, --graupl-backgroundvar(--graupl-theme-active--tertiary)
.bg-tertiary-100background, --graupl-backgroundvar(--graupl-theme-active--tertiary--100)
.bg-tertiary-200background, --graupl-backgroundvar(--graupl-theme-active--tertiary--200)
.bg-tertiary-300background, --graupl-backgroundvar(--graupl-theme-active--tertiary--300)
.bg-tertiary-400background, --graupl-backgroundvar(--graupl-theme-active--tertiary--400)
.bg-tertiary-500background, --graupl-backgroundvar(--graupl-theme-active--tertiary--500)
.bg-tertiary-600background, --graupl-backgroundvar(--graupl-theme-active--tertiary--600)
.bg-tertiary-700background, --graupl-backgroundvar(--graupl-theme-active--tertiary--700)
.bg-tertiary-800background, --graupl-backgroundvar(--graupl-theme-active--tertiary--800)
.bg-tertiary-900background, --graupl-backgroundvar(--graupl-theme-active--tertiary--900)
.bg-inheritbackground, --graupl-backgroundinherit
.bg-currentbackground, --graupl-backgroundcurrentColor
.bg-transparentbackground, --graupl-backgroundtransparent

Text Color

Class NamePropertyValue
.text-primarycolor, --graupl-colorvar(--graupl-theme-active--primary)
.text-primary-100color, --graupl-colorvar(--graupl-theme-active--primary--100)
.text-primary-200color, --graupl-colorvar(--graupl-theme-active--primary--200)
.text-primary-300color, --graupl-colorvar(--graupl-theme-active--primary--300)
.text-primary-400color, --graupl-colorvar(--graupl-theme-active--primary--400)
.text-primary-500color, --graupl-colorvar(--graupl-theme-active--primary--500)
.text-primary-600color, --graupl-colorvar(--graupl-theme-active--primary--600)
.text-primary-700color, --graupl-colorvar(--graupl-theme-active--primary--700)
.text-primary-800color, --graupl-colorvar(--graupl-theme-active--primary--800)
.text-primary-900color, --graupl-colorvar(--graupl-theme-active--primary--900)
.text-secondarycolor, --graupl-colorvar(--graupl-theme-active--secondary)
.text-secondary-100color, --graupl-colorvar(--graupl-theme-active--secondary--100)
.text-secondary-200color, --graupl-colorvar(--graupl-theme-active--secondary--200)
.text-secondary-300color, --graupl-colorvar(--graupl-theme-active--secondary--300)
.text-secondary-400color, --graupl-colorvar(--graupl-theme-active--secondary--400)
.text-secondary-500color, --graupl-colorvar(--graupl-theme-active--secondary--500)
.text-secondary-600color, --graupl-colorvar(--graupl-theme-active--secondary--600)
.text-secondary-700color, --graupl-colorvar(--graupl-theme-active--secondary--700)
.text-secondary-800color, --graupl-colorvar(--graupl-theme-active--secondary--800)
.text-secondary-900color, --graupl-colorvar(--graupl-theme-active--secondary--900)
.text-tertiarycolor, --graupl-colorvar(--graupl-theme-active--tertiary)
.text-tertiary-100color, --graupl-colorvar(--graupl-theme-active--tertiary--100)
.text-tertiary-200color, --graupl-colorvar(--graupl-theme-active--tertiary--200)
.text-tertiary-300color, --graupl-colorvar(--graupl-theme-active--tertiary--300)
.text-tertiary-400color, --graupl-colorvar(--graupl-theme-active--tertiary--400)
.text-tertiary-500color, --graupl-colorvar(--graupl-theme-active--tertiary--500)
.text-tertiary-600color, --graupl-colorvar(--graupl-theme-active--tertiary--600)
.text-tertiary-700color, --graupl-colorvar(--graupl-theme-active--tertiary--700)
.text-tertiary-800color, --graupl-colorvar(--graupl-theme-active--tertiary--800)
.text-tertiary-900color, --graupl-colorvar(--graupl-theme-active--tertiary--900)
.text-inheritcolor, --graupl-colorinherit
.text-currentcolor, --graupl-colorcurrentColor
.text-transparentcolor, --graupl-colortransparent

Customization

To customize the color utilities, you can use the following variables.

VariableDescriptionDefault Value
$selector-baseBase selector for utility classes."."
$selector-prefixThe selector prefix for all utility classes.""
$selector-suffixThe selctor suffix for all utility classes.""
$selector-separatorThe selector separator for all utility classes.""
$use-importantAppends !important to generated utility declarations.true
$generate-base-utilitiesGenerates the base utility classes.true
$screen-awareEnables screen-aware utility variants.false
$theme-awareEnables theme-aware utility variants.false
$scheme-awareEnables scheme-aware utility variants.false
$state-awareEnables state-aware utility variants.false
$container-awareEnables container-aware utility variants.false
$screen-aware-selector-prefixPrefix to the screen-aware portion of utility selectors.""
$screen-aware-selector-suffixSuffix to the screen-aware portion of utility selectors.""
$screen-aware-selector-separatorSeparator inserted for screen-aware utility selectors."\\:"
$theme-aware-selector-prefixPrefix to the theme-aware portion of utility selectors.""
$theme-aware-selector-suffixSuffix to the theme-aware portion of utility selectors."-theme"
$theme-aware-selector-separatorSeparator inserted for theme-aware utility selectors."\\:"
$scheme-aware-selector-prefixPrefix to the scheme-aware portion of utility selectors.""
$scheme-aware-selector-suffixSuffix to the scheme-aware portion of utility selectors."-mode"
$scheme-aware-selector-separatorSeparator inserted for scheme-aware utility selectors."\\:"
$state-aware-selector-prefixPrefix to the state-aware portion of utility selectors.""
$state-aware-selector-suffixSuffix to the state-aware portion of utility selectors.""
$state-aware-selector-separatorSeparator inserted for state-aware utility selectors."\\:"
$container-aware-selector-prefixPrefix to the container-aware portion of utility selectors."cq\\:"
$container-aware-selector-suffixSuffix to the container-aware portion of utility selectors.""
$container-aware-selector-separatorSeparator inserted for container-aware utility selectors."\\:"
$utility-propertiesMap of utility properties.()
$utility-valuesMap of utility values.()
$utility-mapMap of utility property/value pairs.()

Responsive Variants

Generating responsive utility classes can be done by setting $screen-aware, $theme-aware, $scheme-aware, $state-aware, or $container-aware to true.

By default, scheme-aware and state-aware responsive utility classes are generated for color.

✏️ Note

For more information on responsive variants, refer to the Responsive utility classes documentation.