Skip to content

Background Colors

These utility classes set background colors using semantic names for various states and contexts. Use them to ensure consistent background color application across your UI.

Usage

Base Background Colors

Class NameDescriptionColor Token
.spr-background-colorPrimary background colorspr-bg-white-50
.spr-background-color-defaultDefault background colorspr-bg-mushroom-200
.spr-background-color-surfaceSurface background colorspr-bg-mushroom-50
.spr-background-color-surface-adaptiveAdaptive surface background with opacityspr-bg-mushroom-950/[0.05]
.spr-background-color-baseBase background colorspr-bg-mushroom-100

Interactive States

Class NameDescriptionColor Token
.spr-background-color-hoverBackground color on hover statespr-bg-mushroom-950/[0.08]
.spr-background-color-pressedBackground color on pressed statespr-bg-mushroom-950/[0.12]
.spr-background-color-disabledBackground color for disabled elementsspr-bg-white-100

Inverted Colors

Class NameDescriptionColor Token
.spr-background-color-invertedInverted background colorspr-bg-mushroom-950
.spr-background-color-inverted-hoverInverted background on hoverspr-bg-mushroom-900
.spr-background-color-inverted-pressedInverted background on pressedspr-bg-mushroom-800

Active States

Class NameDescriptionColor Token
.spr-background-color-single-activeBackground for single active itemsspr-bg-kangkong-100
.spr-background-color-multiple-activeBackground for multiple active itemsspr-bg-kangkong-50

Brand Colors

Class NameDescriptionColor Token
.spr-background-color-brand-baseBrand background colorspr-bg-kangkong-700
.spr-background-color-brand-hoverBrand background on hoverspr-bg-kangkong-800
.spr-background-color-brand-pressedBrand background on pressedspr-bg-kangkong-900
.spr-background-color-brand-weakSubtle brand backgroundspr-bg-kangkong-100
.spr-background-color-brand-weak-hoverSubtle brand background on hoverspr-bg-kangkong-200
.spr-background-color-brand-weak-pressedSubtle brand background on pressedspr-bg-kangkong-300

Success Colors

Class NameDescriptionColor Token
.spr-background-color-success-baseSuccess background colorspr-bg-kangkong-600
.spr-background-color-success-hoverSuccess background on hoverspr-bg-kangkong-700
.spr-background-color-success-pressedSuccess background on pressedspr-bg-kangkong-800
.spr-background-color-success-weakSubtle success backgroundspr-bg-kangkong-100
.spr-background-color-success-weak-hoverSubtle success background on hoverspr-bg-kangkong-200
.spr-background-color-success-weak-pressedSubtle success background on pressedspr-bg-kangkong-300

Information Colors

Class NameDescriptionColor Token
.spr-background-color-information-baseInformation background colorspr-bg-blueberry-600
.spr-background-color-information-hoverInformation background on hoverspr-bg-blueberry-700
.spr-background-color-information-pressedInformation background on pressedspr-bg-blueberry-800
.spr-background-color-information-weakSubtle information backgroundspr-bg-blueberry-100
.spr-background-color-information-weak-hoverSubtle information background on hoverspr-bg-blueberry-200
.spr-background-color-information-weak-pressedSubtle information background on pressedspr-bg-blueberry-300

Danger Colors

Class NameDescriptionColor Token
.spr-background-color-danger-baseDanger background colorspr-bg-tomato-600
.spr-background-color-danger-hoverDanger background on hoverspr-bg-tomato-700
.spr-background-color-danger-pressedDanger background on pressedspr-bg-tomato-800
.spr-background-color-danger-weakSubtle danger backgroundspr-bg-tomato-100
.spr-background-color-danger-weak-hoverSubtle danger background on hoverspr-bg-tomato-200
.spr-background-color-danger-weak-pressedSubtle danger background on pressedspr-bg-tomato-300

Pending Colors

Class NameDescriptionColor Token
.spr-background-color-pending-basePending background colorspr-bg-mango-500
.spr-background-color-pending-hoverPending background on hoverspr-bg-mango-600
.spr-background-color-pending-pressedPending background on pressedspr-bg-mango-700
.spr-background-color-pending-weakSubtle pending backgroundspr-bg-mango-100
.spr-background-color-pending-weak-hoverSubtle pending background on hoverspr-bg-mango-200
.spr-background-color-pending-weak-pressedSubtle pending background on pressedspr-bg-mango-300

Caution Colors

Class NameDescriptionColor Token
.spr-background-color-caution-baseCaution background colorspr-bg-carrot-500
.spr-background-color-caution-hoverCaution background on hoverspr-bg-carrot-600
.spr-background-color-caution-pressedCaution background on pressedspr-bg-carrot-700
.spr-background-color-caution-weakSubtle caution backgroundspr-bg-carrot-100
.spr-background-color-caution-weak-hoverSubtle caution background on hoverspr-bg-carrot-200
.spr-background-color-caution-weak-pressedSubtle caution background on pressedspr-bg-carrot-300

Accent Colors

Class NameDescriptionColor Token
.spr-background-color-accent-baseAccent background colorspr-bg-wintermelon-600
.spr-background-color-accent-hoverAccent background on hoverspr-bg-wintermelon-700
.spr-background-color-accent-pressedAccent background on pressedspr-bg-wintermelon-800
.spr-background-color-accent-weakSubtle accent backgroundspr-bg-wintermelon-100
.spr-background-color-accent-weak-hoverSubtle accent background on hoverspr-bg-wintermelon-200
.spr-background-color-accent-weak-pressedSubtle accent background on pressedspr-bg-wintermelon-300

Switch Colors

Class NameDescriptionColor Token
.spr-switch-background-defaultSwitch background default colorspr-bg-mushroom-200
.spr-switch-background-hoverSwitch background on hoverspr-bg-mushroom-300
.spr-switch-background-pressedSwitch background on pressedspr-bg-mushroom-400

Examples

html
<!-- Basic usage -->
<div class="spr-background-color">Primary background</div>
<div class="spr-background-color-surface">Surface background</div>

<!-- Interactive states -->
<button class="spr-background-color-brand-base hover:spr-background-color-brand-hover">Brand button</button>

<!-- Status colors -->
<div class="spr-background-color-success-weak">Success message</div>
<div class="spr-background-color-danger-weak">Error message</div>
<div class="spr-background-color-information-weak">Info message</div>