Colors

Color utilities for text, backgrounds, and borders - generated from the $theme-colors map. Every color token produces .text-*, .fg-*, and .bg-* utilities automatically.

Color palette

The full set of theme colors available across all color utilities.

primary #03A9F4
secondary #333333
success #28a745
info #0DCAF0
warning #FFC107
danger #DC3545
light #f5f5f5
dark #212529
red #F44336
green #4CAF50
blue #2196F3
black #000000
white #ffffff
pink #E91E63
purple #9C27B0
indigo #3E51B5
cyan #00BCD4
teal #009688
lime #CDDC39
yellow #FFEB3B
amber #FFC107
orange #FF9800
lightblue #03A9F4
lightgreen #76FF03
deeppurple #673AB7
deeporange #DD6E0F
brown #964B00
grey #808080
28 theme colors total. Semantic tokens (primary, secondary, success, info, warning, danger, light, dark) sit alongside a full Material-style palette (red, pink, purple, deeppurple, indigo, blue, lightblue, cyan, teal, green, lightgreen, lime, yellow, amber, orange, deeporange, brown, grey, black, white) - every one generates matching .text-*/.fg-*, .bg-*, .border-*, .link-*, and .gradient-* utilities.

Text colors

Apply a foreground color to text using .text-{color} or the alias .fg-{color} - both classes generate the same output.

Preview

primary secondary success info warning danger red green blue pink purple indigo cyan teal dark lime yellow amber orange lightblue lightgreen deeppurple deeporange brown grey white
<p class="text-primary">Primary text</p>
<p class="text-danger">Danger text</p>
<p class="fg-success">Success text (alias)</p>
Class Alias Color Value
.text-primary.fg-primaryprimary#03A9F4
.text-secondary.fg-secondarysecondary#333333
.text-success.fg-successsuccess#28a745
.text-info.fg-infoinfo#0DCAF0
.text-warning.fg-warningwarning#FFC107
.text-danger.fg-dangerdanger#DC3545
.text-light.fg-lightlight#f5f5f5
.text-dark.fg-darkdark#212529
.text-red.fg-redred#F44336
.text-green.fg-greengreen#4CAF50
.text-blue.fg-blueblue#2196F3
.text-black.fg-blackblack#000000
.text-white.fg-whitewhite#ffffff
.text-pink.fg-pinkpink#E91E63
.text-purple.fg-purplepurple#9C27B0
.text-indigo.fg-indigoindigo#3E51B5
.text-cyan.fg-cyancyan#00BCD4
.text-teal.fg-tealteal#009688
.text-lime.fg-limelime#CDDC39
.text-yellow.fg-yellowyellow#FFEB3B
.text-amber.fg-amberamber#FFC107
.text-orange.fg-orangeorange#FF9800
.text-lightblue.fg-lightbluelightblue#03A9F4
.text-lightgreen.fg-lightgreenlightgreen#76FF03
.text-deeppurple.fg-deeppurpledeeppurple#673AB7
.text-deeporange.fg-deeporangedeeporange#DD6E0F
.text-brown.fg-brownbrown#964B00
.text-grey.fg-greygrey#808080

Background colors

Set an element's background color with .bg-{color}.

Preview

primary secondary success info warning danger light dark red green blue black white pink purple indigo cyan teal lime yellow amber orange lightblue lightgreen deeppurple deeporange brown grey
<div class="bg-primary text-white px-4 py-2">Primary</div>
<div class="bg-success text-white px-4 py-2">Success</div>
<div class="bg-danger text-white px-4 py-2">Danger</div>
Class Color Value
.bg-primaryprimary#03A9F4
.bg-secondarysecondary#333333
.bg-successsuccess#28a745
.bg-infoinfo#0DCAF0
.bg-warningwarning#FFC107
.bg-dangerdanger#DC3545
.bg-lightlight#f5f5f5
.bg-darkdark#212529
.bg-redred#F44336
.bg-greengreen#4CAF50
.bg-blueblue#2196F3
.bg-blackblack#000000
.bg-whitewhite#ffffff
.bg-pinkpink#E91E63
.bg-purplepurple#9C27B0
.bg-indigoindigo#3E51B5
.bg-cyancyan#00BCD4
.bg-tealteal#009688
.bg-limelime#CDDC39
.bg-yellowyellow#FFEB3B
.bg-amberamber#FFC107
.bg-orangeorange#FF9800
.bg-lightbluelightblue#03A9F4
.bg-lightgreenlightgreen#76FF03
.bg-deeppurpledeeppurple#673AB7
.bg-deeporangedeeporange#DD6E0F
.bg-brownbrown#964B00
.bg-greygrey#808080

Hover variants

Prefix any color utility with hover: to apply it only on mouse hover. Works for both text and background colors.

<!-- Text turns primary on hover -->
<a class="text-secondary hover:text-primary" href="#">Hover me</a>

<!-- Background shifts to danger on hover -->
<button class="bg-primary hover:bg-danger text-white px-4 py-2">
  Delete
</button>

<!-- Combine text and background hover -->
<div class="bg-light hover:bg-primary text-dark hover:text-white px-3 py-2 rounded">
  Card
</div>
All color names are supported. Every token in $theme-colors generates a hover:text-{color} and hover:bg-{color} variant - no extra configuration needed.

Custom colors

ArchCSS is built from SCSS, and a future release will let you override any theme color or extend the palette by redefining variables before importing the source. All utilities would regenerate from your custom map automatically.

Coming soon. SCSS source customization isn't part of the public package yet - the snippets below preview how it will work once it ships.

Override a single token

// Change the primary brand color
$primary: #6366f1;

@use 'archcss/src/scss/index';

Extend the theme-colors map

Add entirely new color tokens by merging into $theme-colors:

// Add custom colors to the palette
$theme-colors: (
  "primary"  : #6366f1,
  "accent"   : #f59e0b,
  "brand"    : #10b981,
);

@use 'archcss/src/scss/index';
Note: Defining $theme-colors replaces the default map. To keep the built-in colors and add new ones, use the SCSS map.merge() function or define your overrides before the @use statement using the with clause.