#Colors

Update
0.7.1

Cirrus comes with a semantic palette and an expanded palette to help you style your page. The expanded palette is a large, hand-tuned collection of colors for the framework.

#Classes

Using a color within Cirrus is as simple as just prefixing the colors with bg- to color the background, text- to color the text, and border- to color the borders.

Examples

Button using indigo-500 for text and indigo-100 for the background.

<button class="text-indigo-500 bg-indigo-100">
    Custom Button
</button>

Square using a info background.

<div class="bg-info u-round-xs mx-auto" style="height: 50px; width: 50px;"></div>

Circle with a purple-500 border.

<div class="u-round-full w-8 h-8 border-purple-500 u-border-2"></div>

#v1 Colors (Semantic)

The standard (semantic) color palette from older versions of the framework.

BackgroundTextBorder
bg-primarytext-primaryborder-primary
bg-whitetext-whiteborder-white
bg-blacktext-blackborder-black
bg-lighttext-lightborder-light
bg-darktext-darkborder-dark
bg-linktext-linkborder-link
bg-link-darktext-link-darkborder-link-dark
bg-infotext-infoborder-info
bg-successtext-successborder-success
bg-warningtext-warningborder-warning
bg-dangertext-dangerborder-danger
bg-transparenttext-transparentborder-transparent

#v2 Colors (Expanded)

Updated
0.7.0

Cirrus has an extensive color palette that has been updated with 0.6.0 to make them more accessible to all page elements.

BackgroundTextBorder
bg-pink-100text-pink-100border-pink-100
bg-pink-200text-pink-200border-pink-200
bg-pink-300text-pink-300border-pink-300
bg-pink-400text-pink-400border-pink-400
bg-pink-500text-pink-500border-pink-500
bg-pink-600text-pink-600border-pink-600
bg-pink-700text-pink-700border-pink-700
bg-pink-800text-pink-800border-pink-800
bg-pink-900text-pink-900border-pink-900
bg-red-100text-red-100border-red-100
bg-red-200text-red-200border-red-200
bg-red-300text-red-300border-red-300
bg-red-400text-red-400border-red-400
bg-red-500text-red-500border-red-500
bg-red-600text-red-600border-red-600
bg-red-700text-red-700border-red-700
bg-red-800text-red-800border-red-800
bg-red-900text-red-900border-red-900
bg-orange-100text-orange-100border-orange-100
bg-orange-200text-orange-200border-orange-200
bg-orange-300text-orange-300border-orange-300
bg-orange-400text-orange-400border-orange-400
bg-orange-500text-orange-500border-orange-500
bg-orange-600text-orange-600border-orange-600
bg-orange-700text-orange-700border-orange-700
bg-orange-800text-orange-800border-orange-800
bg-orange-900text-orange-900border-orange-900
bg-yellow-100text-yellow-100border-yellow-100
bg-yellow-200text-yellow-200border-yellow-200
bg-yellow-300text-yellow-300border-yellow-300
bg-yellow-400text-yellow-400border-yellow-400
bg-yellow-500text-yellow-500border-yellow-500
bg-yellow-600text-yellow-600border-yellow-600
bg-yellow-700text-yellow-700border-yellow-700
bg-yellow-800text-yellow-800border-yellow-800
bg-yellow-900text-yellow-900border-yellow-900
bg-green-100text-green-100border-green-100
bg-green-200text-green-200border-green-200
bg-green-300text-green-300border-green-300
bg-green-400text-green-400border-green-400
bg-green-500text-green-500border-green-500
bg-green-600text-green-600border-green-600
bg-green-700text-green-700border-green-700
bg-green-800text-green-800border-green-800
bg-green-900text-green-900border-green-900
bg-teal-100text-teal-100border-teal-100
bg-teal-200text-teal-200border-teal-200
bg-teal-300text-teal-300border-teal-300
bg-teal-400text-teal-400border-teal-400
bg-teal-500text-teal-500border-teal-500
bg-teal-600text-teal-600border-teal-600
bg-teal-700text-teal-700border-teal-700
bg-teal-800text-teal-800border-teal-800
bg-teal-900text-teal-900border-teal-900
bg-blue-100text-blue-100border-blue-100
bg-blue-200text-blue-200border-blue-200
bg-blue-300text-blue-300border-blue-300
bg-blue-400text-blue-400border-blue-400
bg-blue-500text-blue-500border-blue-500
bg-blue-600text-blue-600border-blue-600
bg-blue-700text-blue-700border-blue-700
bg-blue-800text-blue-800border-blue-800
bg-blue-900text-blue-900border-blue-900
bg-indigo-100text-indigo-100border-indigo-100
bg-indigo-200text-indigo-200border-indigo-200
bg-indigo-300text-indigo-300border-indigo-300
bg-indigo-400text-indigo-400border-indigo-400
bg-indigo-500text-indigo-500border-indigo-500
bg-indigo-600text-indigo-600border-indigo-600
bg-indigo-700text-indigo-700border-indigo-700
bg-indigo-800text-indigo-800border-indigo-800
bg-indigo-900text-indigo-900border-indigo-900
bg-purple-100text-purple-100border-purple-100
bg-purple-200text-purple-200border-purple-200
bg-purple-300text-purple-300border-purple-300
bg-purple-400text-purple-400border-purple-400
bg-purple-500text-purple-500border-purple-500
bg-purple-600text-purple-600border-purple-600
bg-purple-700text-purple-700border-purple-700
bg-purple-800text-purple-800border-purple-800
bg-purple-900text-purple-900border-purple-900
bg-gray-000text-gray-000border-gray-000
bg-gray-100text-gray-100border-gray-100
bg-gray-200text-gray-200border-gray-200
bg-gray-300text-gray-300border-gray-300
bg-gray-400text-gray-400border-gray-400
bg-gray-500text-gray-500border-gray-500
bg-gray-600text-gray-600border-gray-600
bg-gray-700text-gray-700border-gray-700
bg-gray-800text-gray-800border-gray-800
bg-gray-900text-gray-900border-gray-900
#Pink
#Red
#Orange
#Yellow
#Green
#Teal
#Blue
#Indigo
#Purple
#Gray

#Changing Opacity

Docs have been moved to theOpacity page.

#Extending Colors

New
0.7.0

If you want additional colors on top of the ones shipped with Cirrus, you can extend the color palette via its Sass configuration within the extend map of the config.

Below is an example of adding a new magenta color:

@use "cirrus-ui/src/cirrus-ext" as * with (
    $config: (
        extend: (
            colors: (
                extended: (
                    'magenta': (
                        '100': #FEF7F4,
                        '200': #FBE0DD,
                        '300': #F2AFB3,
                        '400': #EC798B,
                        '500': #DC5472,
                        '600': #BC3263,
                        '700': #98184D,
                        '800': #73123F,
                        '900': #560E39,
                    )
                )
            )
        )
    ),
);

The new config will generate the following additional classes:

.bg-magenta-100 { ... }
// ...
.bg-magenta-900 { ... }
.text-magenta-100 { ... }
// ...
.text-magenta-900 { ... }

The extend map can also be used for overriding existing values. For example, the following config will override bg-blue-500 and text-blue-500 to use #fff.

@use "cirrus-ui/src/cirrus-ext" as * with (
    $config: (
        extend: (
            colors: (
                extended: (
                    'blue': (
                        '500': #fff,
                    )
                )
            )
        )
    ),
);
.bg-blue-500 { background-color: #fff !important; }
.text-blue-500 { color: #fff !important; }

#Disabling Colors

New
0.7.0

If you would like to remove a default color, you can simply set any of the color maps of the extended palette to null. Cirrus will not generate any of these colors in the final build.

@use "cirrus-ui/src/cirrus-ext" as * with (
    $config: (
        colors: (
            // Note: The quotes matter!
            'pink': null,
            'red': null,
            'orange': null,
            'yellow': null,
            'green': null,
            'teal': null,
            'blue': null,
            'indigo': null,
            'purple': null,
            'gray': null,
        )
    ),
);
⚠ Warning

Note that disabling certain colors can lead to build errors! These colors are relied on by other parts of the framework.

@use "cirrus-ui/src/cirrus-ext" as * with (
    $config: (
        colors: (
            'gray': null,
        )
    ),
);
Error in plugin "sass"
Message:
    src\base\layout.scss
Error: $color: "ERROR [fill()]: [fill] Unknown color key `gray 500`." is not a color.       
39 │     border-top: 0.05rem solid transparentize(fill('gray', '500'), 0.5);
   │                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  srcaselayout.scss 39:31  @use
  srccore.scss 11:1          @use
  srcext.scss 4:1            @use
  srcmain.scss 30:1          root stylesheet

Be sure to supply your own replacement color under the extend section.

@use "cirrus-ui/src/cirrus-ext" as * with (
    $config: (
        colors: (
            'gray': null,
        ),
        extend: (
            colors: (
                'gray': (
                    '100': ...,
                    ...
                )
            )
        )
    ),
);