CSS Color Variables
If you need to change the primary or secondary color, on your custom CSS file, you just need to update the following CSS variables. Please note that this does not require you to recompile the SCSS files.
We recommend updating only the hue and saturation value and leave the lightness to 50%.
:root {
/** Provide the HSL values **/
--primary-color-hs: 8deg, 34%;
--primary-color-l: 50%;
--secondary-color-hs: 188deg, 34%;
--secondary-color-l: 50%;
}
To use your primary and secondary color on your custom css file, you can use the following CSS variables:
:root {
/** You can change the word primary to secondary,
success, info, danger, or warning, whichever you
want to use. **/
--primary-color;
--primary-color-light; /** +15% **/
--primary-color-dark; /** -15% **/
--primary-color-lighten-45;
--primary-color-lighten-40;
--primary-color-lighten-35;
--primary-color-lighten-30;
--primary-color-lighten-25;
--primary-color-lighten-20;
--primary-color-lighten-15;
--primary-color-lighten-10;
--primary-color-lighten-5;
--primary-color-darken-5;
--primary-color-darken-10;
--primary-color-darken-15;
--primary-color-darken-20;
--primary-color-darken-25;
--primary-color-darken-30;
--primary-color-darken-35;
--primary-color-darken-40;
--primary-color-darken-45;
}
/** Usage Example **/
.card {
background-color: var(--secondary-color-lighten-40);
color: var(--primary-color-dark);
border: 2px solid var(--primary-color);
}
If you need the alpha channel, you can use the following CSS variables for your primary and secondary color:
:root {
/** You can change the word primary to secondary,
success, info, danger, or warning, whichever you
want to use. **/
--primary-color-hsl;
--primary-color-light-hsl; /** +15% **/
--primary-color-dark-hsl; /** -15% **/
--primary-color-lighten-45-hsl;
--primary-color-lighten-40-hsl;
--primary-color-lighten-35-hsl;
--primary-color-lighten-30-hsl;
--primary-color-lighten-25-hsl;
--primary-color-lighten-20-hsl;
--primary-color-lighten-15-hsl;
--primary-color-lighten-10-hsl;
--primary-color-lighten-5-hsl;
--primary-color-darken-5-hsl;
--primary-color-darken-10-hsl;
--primary-color-darken-15-hsl;
--primary-color-darken-20-hsl;
--primary-color-darken-25-hsl;
--primary-color-darken-30-hsl;
--primary-color-darken-35-hsl;
--primary-color-darken-40-hsl;
--primary-color-darken-45-hsl;
}
/** Usage Example **/
.card {
background-color: hsla(var(--secondary-color-lighten-40-hsl), 50%);
color: hsla(var(--primary-color-darken-15-hsl), 0.9);
border: 2px solid hsla(var(--primary-color-hsl), .8);
}
You can also use the following classes for quick setting of the element's background or text color to primary or secondary color:
.primary-color
.primary-color-text
.secondary-color
.secondary-color-text
We also support colors by semantic purposes.
.success-color
.success-color-text
.info-color
.info-color-text
.danger-color
.danger-color-text
.warning-color
.warning-color-text