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-*

BY Best Interview Question ON 03 Jul 2020