StartBootstrap / startbootstrap-sb-admin-2

A free, open source, Bootstrap admin theme created by Start Bootstrap
https://startbootstrap.com/themes/sb-admin-2/
MIT License
9.76k stars 5.72k forks source link

Change primary color #250

Closed RoelvanDaele closed 4 years ago

RoelvanDaele commented 5 years ago

Hi guys,

Is is possible to change the primary color within SB Admin 2? For instance, I want to use this color as primary color #d53820.

Thanks in advance!

Roel

tiesont commented 5 years ago

The same process that Bootstrap suggests (see https://getbootstrap.com/docs/4.3/getting-started/theming/#variable-defaults) would work, assuming you're using some sort of Sass compiler.

You can add something like this to the top of https://github.com/BlackrockDigital/startbootstrap-sb-admin-2/blob/master/scss/sb-admin-2.scss

$primary: #d53820;

Assuming you don't want to edit the sb-admin-2.scss file, you could (probably should) create your own colors.scss file with the above line, then just make sure that you import your color file before importing sb-admin-2. So, your custom Sass file would look something like

@import 'colors.scss';
@import 'path/to/sb-admin-2.scss';

/* the rest of your styles... */