1.

How many colors in Bootstrap 4?

Answer»

There are two types of Bootstrap 4 colors:-

  • Text Colours
  • Background Colours

Text Colours:-

Bootstrap 4 has few contextual classes which can be used to give "MEANING through colours". The classes for the text colours are: .text-muted, .text-success, .text-info, .text-primary, .text-danger, .text-secondary, .text-dark, .text-WHITE, .text-BODY (DEFAULT body colour/often black) and .text-light. Contextual classes can be used on links, and this will ADD a darker hover color. 50% opacity for black or white text can be added with the classes .text-black-50 or .text-white-50.

Background Colours:-

The background colours classes are .bg-primary, .bg-warning, .bg-info, .bg-success, .bg-danger, .bg-secondary, .bg-dark & .bg-light. Since the background colours do not set the colour of the text therefore the developer have to use them with the class .text-*



Discussion

No Comment Found