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

 

READ  Why Does Open Source Really Matter? It's about Control, Not Code

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.

Share!

ALEXANDER WAYNE OMOROKUNWA

ALEXANDER WAYNE OMOROKUNWA

Chief Editor/Founder at FossNaija
A Linux enthusiast with a focus on enriching the Nigeria Linux experience and keeping a keen eye on Ubuntu and other Foss related developments.
ALEXANDER WAYNE OMOROKUNWA

Tell us what you think

This site uses Akismet to reduce spam. Learn how your comment data is processed.