Predefined colors in Bootstrap

There are classes that specify color. For example, bg-primary means primary color for background. As you see class consist from prefix bg and suffix primary. Prefix denotes an element on which color must be applied, and suffix denotes color.

Color can be applied to text, background, border, table and etc.

There are main colors suffixes:

  • primary
  • secondary
  • success
  • danger
  • warning
  • info
  • light
  • dark
  • black
  • white

text color

Code example














background color

By adding a bg-gradient class, a linear gradient is added as background image to the backgrounds. This gradient starts with a semi-transparent white which fades out to the bottom.

Code example