DEV Community

Alexander Omorokunwa
Alexander Omorokunwa

Posted on • Originally published at fossnaija.com on

How to Change Bootstrap Default Colour Theme: Without writing Code.

bootstrap banner

IMAGE: Bootsrap Banner/FossNaija

For those of y’all that don’t know what bootstrap is, bootstrap is one of the most amazing development that have come into front-end web development. It’s a responsive framework that helps to reduce development time by providing ready-to-use UI/UX components that can be easily imported into any website/application UI/UX design, while focusing more on content.

One thing to note about using bootstrap; is that websites/applications using the framework look somewhat similar (at least when using the default colour configurations and settings). It would take some style overriding (writing a lot of CSS) to actually create a truly customize version of the interface.

default_bootstrap_colour_scheme

IMAGE: Default Bootstrap Colour Scheme/FossNaija

When you see the default colour scheme of the above site, no doubt it can easily be guessed that the site was designed using the bootstrap framework.

To save you the sweat of writing too much !important CSS code, in this post I’d show how you can download and use different bootstrap colour themes/templates to achieve that.

Let’s go…

In this post I’m assuming you have already set up a website using bootstrap that you want to change the theme.

I’ve set up one basic website for the purpose of this tutorial and it looks like this.

default_bootstrap_colour_scheme

IMAGE: Default Bootstrap Colour Scheme/FossNaija

If you are familiar with bootstrap you’d notice the different default colours available: like blue buttons, alerts, navbar, jumbotron, backgrounds, etc.

Now let get another colour scheme.

Head to Bootswatch.com and select the colour scheme of your choice.

bootswatch colour themes

IMAGE: Some Bootswatch Colour Themes / FossNaija

I would be using the Cyborg theme for this post. After selecting the colour scheme you want, then you can download the CSS (bootrstrap.min.css) file to your computer.

bootswatch cyborg theme

IMAGE: Bootswatch Cyborg theme/FossNaija

Then move it to your project default bootstrap file location and replace the bootstrap.min.css file (i.e. you can delete the bootstrap original file).

NB: Ensure that it is the file name pointed to by the link reference in your project HTML files .

bootstrap css link code

IMAGE: Bootstrap css link code/FossNaija

Then reload the page. The new colour scheme should be loaded now.

bootstrap new colour theme

IMAGE: Bootstrap new colour theme /FossNaija.

Happy CODING!!!

Download the Basic website code HERE.

The post How to Change Bootstrap Default Colour Theme: Without writing Code. appeared first on Foss Naija.

Top comments (4)

Collapse
 
joellau profile image
Joel Lau

thanks for the article! I work with bootstrap often and this is going to save me a loooot of time

Collapse
 
xeroxism profile image
Alexander Omorokunwa

Glad I could help....

Collapse
 
obosore01 profile image
obosore01

I like to use Bootswatch (bootswatch.com) but recently I found BootstrapPlusPlus (bootstrapplusplus.com), it's also nice.

Collapse
 
xeroxism profile image
Alexander Omorokunwa

Yeah I see, somewhat similar though. 😁