Color system

Overview

Custom color system - a set of CSS classes and SCSS variables that allow to change colors on-the-fly directly in markup by changing class name or use color tints and shades in SCSS code. Color system includes 11 color palettes: 6 contextual (primary, secondary, danger, success, warning and info) and 5 secondary colors. The system is fully controlled by variable maps in _variables-core.scss and is a part of Bootstrap core since version 3.0.

The color system is supported by almost all layout elements and components: sidebar, navbar, content panels, links, text, icons, alerts, dropdown menus, form components, tables, tabs, progress bars, buttons, notifications, popovers, tooltips, badges etc. The system consists of 11 color palettes, each palette includes 1 main color (e.g. .bg-danger) in both HEX and RGB formats, color classes also support alpha transparency that can be set via .bg-opacity-[0|10|20|25|50|75] classes. List fo colors can be easily extended by adding or removing properties in $theme-colors and $dark-theme-colors SASS maps in _variables-core.scss file.

Available color palettes:

  • Primary palette
  • Secondary palette
  • Danger palette
  • Success palette
  • Warning palette
  • Info palette
  • Pink palette
  • Purple palette
  • Indigo palette
  • Teal palette
  • Yellow palette

When you add a new color to $theme-colors or $dark-theme-colors SASS maps in _variables-core.scss file, template configuration automatically creates a CSS variable for this color in HEX and RGB format and adds it to the root level.

                                                            
                                                                // SCSS input
                                                                $theme-colors: (
                                                                "indigo-100": $indigo-100,
                                                                ...
                                                                );

                                                                // CSS output
                                                                :root,
                                                                [data-color-theme=light] {
                                                                --indigo-100: #eff0f9;
                                                                --indigo-100-rgb: 239,240,249;
                                                                ...
                                                                }
                                                            
                                                        
Basic usage

Usage is very simple, all you need to do is to add one of the color CSS classes to the element. Limitless template includes a bunch of pages with demonstration of how color palette is used - in components, elements and layout parts. Depending on what part of element you want to change, available classes are (primary palette is an example):

Class Description
Background
.bg-primary Background color. Can be added to dropdown menus, sidebar, navbar, alerts, inputs, cards, selects etc. In certain cases requires .text-white class to inverse text color
Borders
.border-primary Border color. Any element that contains border. Can be used in combination with .border class that adds a border to an element
border-top-primary Top border only. Any element that contains all sides border or top border only. Can be used in combination with .border-top class that adds a top border to an element
border-bottom-primary Bottom border only. Any element that contains all sides border or bottom border only. Can be used in combination with .border-bottom class that adds a bottom border to an element
border-start-primary Left border only. Any element that contains all sides border or left border only. Can be used in combination with .border-start class that adds a left border to an element
border-end-primary Right border only. Any element that contains all sides border or right border only. Can be used in combination with .border-end class that adds a right border to an element
Text
.text-primary Text color. Can be used in text, icons and links
.link-primary Text link color. Used in links only
Buttons
.btn-primary Solid button color
.btn-outline-primary Outline button color
.btn-flat-primary Flat button color
Alerts
.alert-primary Alert color. Can be used in all alert style variations
Table
.table-primary Table cell/row color
List group
.list-group-item-primary Text and links in link group
Colors

Color system uses custom color palette generated from 1 primary color (e.g. $blue-500) using SASS color functions: tint-color() for lighter color and shade-color() for lighter colors. Lightness and darkness step varies from 20% to 30%. Colored blocks below demonstrate all color codes and variables used in the template:

100 $blue-100
200 $blue-200
300 $blue-300
400 $blue-400
500 $blue-500
600 $blue-600
700 $blue-700
800 $blue-800
900 $blue-900
Primary (blue) palette
100 $slate-100
200 $slate-200
300 $slate-300
400 $slate-400
500 $slate-500
600 $slate-600
700 $slate-700
800 $slate-800
900 $slate-900
Secondary (slate) palette
100 $red-100
200 $red-200
300 $red-300
400 $red-400
500 $red-500
600 $red-600
700 $red-700
800 $red-800
900 $red-900
Danger (red) palette
100 $green-100
200 $green-200
300 $green-300
400 $green-400
500 $green-500
600 $green-600
700 $green-700
800 $green-800
900 $green-900
Success (green) palette
100 $orange-100
200 $orange-200
300 $orange-300
400 $orange-400
500 $orange-500
600 $orange-600
700 $orange-700
800 $orange-800
900 $orange-900
Warning (orange) palette
100 $cyan-100
200 $cyan-200
300 $cyan-300
400 $cyan-400
500 $cyan-500
600 $cyan-600
700 $cyan-700
800 $cyan-800
900 $cyan-900
Info (cyan) palette
100 $pink-100
200 $pink-200
300 $pink-300
400 $pink-400
500 $pink-500
600 $pink-600
700 $pink-700
800 $pink-800
900 $pink-900
Pink palette
100 $purple-100
200 $purple-200
300 $purple-300
400 $purple-400
500 $purple-500
600 $purple-600
700 $purple-700
800 $purple-800
900 $purple-900
Purple palette
100 $indigo-100
200 $indigo-200
300 $indigo-300
400 $indigo-400
500 $indigo-500
600 $indigo-600
700 $indigo-700
800 $indigo-800
900 $indigo-900
Indigo palette
100 $teal-100
200 $teal-200
300 $teal-300
400 $teal-400
500 $teal-500
600 $teal-600
700 $teal-700
800 $teal-800
900 $teal-900
Teal palette
100 $yellow-100
200 $yellow-200
300 $yellow-300
400 $yellow-400
500 $yellow-500
600 $yellow-600
700 $yellow-700
800 $yellow-800
900 $yellow-900
Yellow palette
100 $gray-100
200 $gray-200
300 $gray-300
400 $gray-400
500 $gray-500
600 $gray-600
700 $gray-700
800 $gray-800
900 $gray-900
Gray palette
© Themesbrand.
Crafted with by Themesbrand