Colors ​

Graupl provides primary, secondary, and tertiary palettes. The colour theme uses those palettes to set the root text and background colours and provides colour properties for components.

Palettes ​

Each palette has a base colour and nine numbered shades. Select a palette to see its shades.

See the colour utilities for examples of applying background and text colours with classes.

Dark mode ​

Use .dark-mode to apply dark mode to an element and its descendants. Use .light-mode to apply light mode.

Custom Properties ​

The following custom properties can be used to customize the colour theme:

PropertyDescriptionDefault Value
--graupl-primaryPrimary base colour.hsl(219deg 75% 50%)
--graupl-primary--100Primary shade 100.hsl(219deg 100% 95%)
--graupl-primary--200Primary shade 200.hsl(219deg 90% 80%)
--graupl-primary--300Primary shade 300.hsl(219deg 80% 65%)
--graupl-primary--400Primary shade 400.hsl(219deg 75% 55%)
--graupl-primary--500Primary shade 500.hsl(219deg 75% 50%)
--graupl-primary--600Primary shade 600.hsl(219deg 75% 45%)
--graupl-primary--700Primary shade 700.hsl(219deg 80% 35%)
--graupl-primary--800Primary shade 800.hsl(219deg 90% 20%)
--graupl-primary--900Primary shade 900.hsl(219deg 100% 10%)
--graupl-secondarySecondary base colour.hsl(235deg 15% 50%)
--graupl-secondary--100Secondary shade 100.hsl(235deg 40% 95%)
--graupl-secondary--200Secondary shade 200.hsl(235deg 30% 80%)
--graupl-secondary--300Secondary shade 300.hsl(235deg 20% 65%)
--graupl-secondary--400Secondary shade 400.hsl(235deg 15% 55%)
--graupl-secondary--500Secondary shade 500.hsl(235deg 15% 50%)
--graupl-secondary--600Secondary shade 600.hsl(235deg 15% 45%)
--graupl-secondary--700Secondary shade 700.hsl(235deg 20% 35%)
--graupl-secondary--800Secondary shade 800.hsl(235deg 30% 20%)
--graupl-secondary--900Secondary shade 900.hsl(235deg 40% 10%)
--graupl-tertiaryTertiary base colour.hsl(340deg 60% 50%)
--graupl-tertiary--100Tertiary shade 100.hsl(340deg 85% 95%)
--graupl-tertiary--200Tertiary shade 200.hsl(340deg 75% 80%)
--graupl-tertiary--300Tertiary shade 300.hsl(340deg 65% 65%)
--graupl-tertiary--400Tertiary shade 400.hsl(340deg 60% 55%)
--graupl-tertiary--500Tertiary shade 500.hsl(340deg 60% 50%)
--graupl-tertiary--600Tertiary shade 600.hsl(340deg 60% 45%)
--graupl-tertiary--700Tertiary shade 700.hsl(340deg 65% 35%)
--graupl-tertiary--800Tertiary shade 800.hsl(340deg 75% 20%)
--graupl-tertiary--900Tertiary shade 900.hsl(340deg 85% 10%)
--graupl-theme-default--primaryDefault theme primary base colour.light-dark(var(--graupl-primary), var(--graupl-primary))
--graupl-theme-default--primary--100Default theme primary shade 100.light-dark(var(--graupl-primary--100), var(--graupl-primary--900))
--graupl-theme-default--primary--200Default theme primary shade 200.light-dark(var(--graupl-primary--200), var(--graupl-primary--800))
--graupl-theme-default--primary--300Default theme primary shade 300.light-dark(var(--graupl-primary--300), var(--graupl-primary--700))
--graupl-theme-default--primary--400Default theme primary shade 400.light-dark(var(--graupl-primary--400), var(--graupl-primary--600))
--graupl-theme-default--primary--500Default theme primary shade 500.light-dark(var(--graupl-primary--500), var(--graupl-primary--500))
--graupl-theme-default--primary--600Default theme primary shade 600.light-dark(var(--graupl-primary--600), var(--graupl-primary--400))
--graupl-theme-default--primary--700Default theme primary shade 700.light-dark(var(--graupl-primary--700), var(--graupl-primary--300))
--graupl-theme-default--primary--800Default theme primary shade 800.light-dark(var(--graupl-primary--800), var(--graupl-primary--200))
--graupl-theme-default--primary--900Default theme primary shade 900.light-dark(var(--graupl-primary--900), var(--graupl-primary--100))
--graupl-theme-default--secondaryDefault theme secondary base colour.light-dark(var(--graupl-secondary), var(--graupl-secondary))
--graupl-theme-default--secondary--100Default theme secondary shade 100.light-dark(var(--graupl-secondary--100), var(--graupl-secondary--900))
--graupl-theme-default--secondary--200Default theme secondary shade 200.light-dark(var(--graupl-secondary--200), var(--graupl-secondary--800))
--graupl-theme-default--secondary--300Default theme secondary shade 300.light-dark(var(--graupl-secondary--300), var(--graupl-secondary--700))
--graupl-theme-default--secondary--400Default theme secondary shade 400.light-dark(var(--graupl-secondary--400), var(--graupl-secondary--600))
--graupl-theme-default--secondary--500Default theme secondary shade 500.light-dark(var(--graupl-secondary--500), var(--graupl-secondary--500))
--graupl-theme-default--secondary--600Default theme secondary shade 600.light-dark(var(--graupl-secondary--600), var(--graupl-secondary--400))
--graupl-theme-default--secondary--700Default theme secondary shade 700.light-dark(var(--graupl-secondary--700), var(--graupl-secondary--300))
--graupl-theme-default--secondary--800Default theme secondary shade 800.light-dark(var(--graupl-secondary--800), var(--graupl-secondary--200))
--graupl-theme-default--secondary--900Default theme secondary shade 900.light-dark(var(--graupl-secondary--900), var(--graupl-secondary--100))
--graupl-theme-default--tertiaryDefault theme tertiary base colour.light-dark(var(--graupl-tertiary), var(--graupl-tertiary))
--graupl-theme-default--tertiary--100Default theme tertiary shade 100.light-dark(var(--graupl-tertiary--100), var(--graupl-tertiary--900))
--graupl-theme-default--tertiary--200Default theme tertiary shade 200.light-dark(var(--graupl-tertiary--200), var(--graupl-tertiary--800))
--graupl-theme-default--tertiary--300Default theme tertiary shade 300.light-dark(var(--graupl-tertiary--300), var(--graupl-tertiary--700))
--graupl-theme-default--tertiary--400Default theme tertiary shade 400.light-dark(var(--graupl-tertiary--400), var(--graupl-tertiary--600))
--graupl-theme-default--tertiary--500Default theme tertiary shade 500.light-dark(var(--graupl-tertiary--500), var(--graupl-tertiary--500))
--graupl-theme-default--tertiary--600Default theme tertiary shade 600.light-dark(var(--graupl-tertiary--600), var(--graupl-tertiary--400))
--graupl-theme-default--tertiary--700Default theme tertiary shade 700.light-dark(var(--graupl-tertiary--700), var(--graupl-tertiary--300))
--graupl-theme-default--tertiary--800Default theme tertiary shade 800.light-dark(var(--graupl-tertiary--800), var(--graupl-tertiary--200))
--graupl-theme-default--tertiary--900Default theme tertiary shade 900.light-dark(var(--graupl-tertiary--900), var(--graupl-tertiary--100))
--graupl-theme-active--primaryActive theme primary base colour.var(--graupl-theme-default--primary)
--graupl-theme-active--primary--100Active theme primary shade 100.var(--graupl-theme-default--primary--100)
--graupl-theme-active--primary--200Active theme primary shade 200.var(--graupl-theme-default--primary--200)
--graupl-theme-active--primary--300Active theme primary shade 300.var(--graupl-theme-default--primary--300)
--graupl-theme-active--primary--400Active theme primary shade 400.var(--graupl-theme-default--primary--400)
--graupl-theme-active--primary--500Active theme primary shade 500.var(--graupl-theme-default--primary--500)
--graupl-theme-active--primary--600Active theme primary shade 600.var(--graupl-theme-default--primary--600)
--graupl-theme-active--primary--700Active theme primary shade 700.var(--graupl-theme-default--primary--700)
--graupl-theme-active--primary--800Active theme primary shade 800.var(--graupl-theme-default--primary--800)
--graupl-theme-active--primary--900Active theme primary shade 900.var(--graupl-theme-default--primary--900)
--graupl-theme-active--secondaryActive theme secondary base colour.var(--graupl-theme-default--secondary)
--graupl-theme-active--secondary--100Active theme secondary shade 100.var(--graupl-theme-default--secondary--100)
--graupl-theme-active--secondary--200Active theme secondary shade 200.var(--graupl-theme-default--secondary--200)
--graupl-theme-active--secondary--300Active theme secondary shade 300.var(--graupl-theme-default--secondary--300)
--graupl-theme-active--secondary--400Active theme secondary shade 400.var(--graupl-theme-default--secondary--400)
--graupl-theme-active--secondary--500Active theme secondary shade 500.var(--graupl-theme-default--secondary--500)
--graupl-theme-active--secondary--600Active theme secondary shade 600.var(--graupl-theme-default--secondary--600)
--graupl-theme-active--secondary--700Active theme secondary shade 700.var(--graupl-theme-default--secondary--700)
--graupl-theme-active--secondary--800Active theme secondary shade 800.var(--graupl-theme-default--secondary--800)
--graupl-theme-active--secondary--900Active theme secondary shade 900.var(--graupl-theme-default--secondary--900)
--graupl-theme-active--tertiaryActive theme tertiary base colour.var(--graupl-theme-default--tertiary)
--graupl-theme-active--tertiary--100Active theme tertiary shade 100.var(--graupl-theme-default--tertiary--100)
--graupl-theme-active--tertiary--200Active theme tertiary shade 200.var(--graupl-theme-default--tertiary--200)
--graupl-theme-active--tertiary--300Active theme tertiary shade 300.var(--graupl-theme-default--tertiary--300)
--graupl-theme-active--tertiary--400Active theme tertiary shade 400.var(--graupl-theme-default--tertiary--400)
--graupl-theme-active--tertiary--500Active theme tertiary shade 500.var(--graupl-theme-default--tertiary--500)
--graupl-theme-active--tertiary--600Active theme tertiary shade 600.var(--graupl-theme-default--tertiary--600)
--graupl-theme-active--tertiary--700Active theme tertiary shade 700.var(--graupl-theme-default--tertiary--700)
--graupl-theme-active--tertiary--800Active theme tertiary shade 800.var(--graupl-theme-default--tertiary--800)
--graupl-theme-active--tertiary--900Active theme tertiary shade 900.var(--graupl-theme-default--tertiary--900)
--graupl-color-schemeColour scheme used by the root element.light
--graupl-root-colorText colour of the root element.var(--graupl-theme-active--primary--900)
--graupl-root-backgroundBackground colour of the root element.var(--graupl-theme-active--primary--100)
--graupl-colorText colour token.var(--graupl-root-color)
--graupl-backgroundBackground colour token.var(--graupl-root-background)
--graupl-border-colorBorder colour token.var(--graupl-color)

Use the base palette properties to change colours across the default theme. Set a default theme property to override an individual theme colour. These properties are unset by default, so the theme uses the light or dark fallback listed in the table. Active theme properties give components the colour for the current theme.

Sass variables ​

The following Sass variables can be used to customize the generation of the colour theme:

VariableDescriptionDefault Value
$selector-baseUnused by the colour theme."."
$modifier-selector-baseDefault prefix for theme and scheme selectors."."
$generate-base-colorsFlag to generate base colour tokens.true
$generate-base-themesFlag to generate base theme tokens.true
$theme-selector-baseThe selector base for the theme modifiers."."
$theme-selector-prefixPrefix for theme modifiers.""
$theme-selector-suffixSuffix for theme modifiers."-theme"
$scheme-selector-baseThe selector base for the scheme modifiers."."
$scheme-selector-prefixPrefix for scheme modifiers.""
$scheme-selector-suffixSuffix for scheme modifiers."-mode"
$root-selector-basePrefix for the root selector.":"
$root-selectorName of the root selector."root"
$colorsMap of base colours and shades.()
$themesAdditional theme names.()
$default-themeTheme used for the active colour properties on the root element."default"
$schemesAdditional colour schemes to generate.()
$theme-schemesThe default scheme for each theme.()
$non-themeable-colorsList of colours to exclude from the default theme colour map.()
$theme-colorsMap of colours for each theme.()
$scheme-mappingsMap of shades to use for each theme and colour scheme.()
$theme-mapMap of colour and shade references for each theme.()

See Compiling Graupl for how to configure these variables.