Bootstrap 4 Color classes : 

Bootstrap 4 Color classes : 

Bootstrap 4 Color classes : 

Text Colors: Bootstrap 4 provides many Classes to set the text color of an element.

The classes for text colors are:

  1.   .text-muted
  2.   .text-white
  3.   .text-success
  4.   .ext-secondary
  5.   .text-text-dark
  6.   .text-danger
  7.   .text-info
  8.   .text-body
  9.   .text-warning
  10.   .text-light
  11.   .text-primary

Example:

  1. <!doctype html>
  2. <html lang="en">
  3.   <head>
  4.     <!-- here Required meta tags -->
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <!-- here Bootstrap CSS -->
  8.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  9.     <title>Bootstrap 4, Colors List!</title>
  10.   </head>
  11.   <body>
  12.     <div class="container">
  13.         <p class="text-muted">This is text-muted</p>
  14.         <p class="text-white">This is text-white</p>
  15.         <p class="text-success">This is text-success</p>
  16.         <p class="text-secondary">This is text-secondary</p>
  17.         <p class="text-text-dark">This is text-dark</p>
  18.         <p class="text-danger">This is text-danger</p>
  19.         <p class="text-info">This is text-info</p>
  20.         <p class="text-body">This is text-body</p>
  21.         <p class="text-warning" >This is text-warning</p>
  22.         <p class="text-light" >This is text-light</p>
  23.         <p class="text-primary">This is text-primary</p>
  24.     </div>
  25.     <!-- here Optional JavaScript -->
  26.     <!-- here jQuery first, then Popper.js, then Bootstrap JS -->
  27.     <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  28.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  29.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  30.   </body>
  31. </html>

 

Output:

 

Bootstrap 4 Background Colors:

Bootstrap 4 provides many classes to set the Background Color of an Element.......
All Classes of Background Colors are listed below:

  1.   .bg-primary
  2.   .bg-danger
  3.   .bg-success
  4.   .bg-secondary
  5.   .bg-info
  6.   .bg-dark
  7.   .bg-warning
  8.   .bg-light

Example: 

  1. <!doctype html>
  2. <html lang="en">
  3.   <head>
  4.     <!-- here Required meta tags -->
  5.     <meta charset="utf-8">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7.     <!-- here Bootstrap CSS -->
  8.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  9.     <title>Bootstrap 4, Background Colors!</title>
  10.   </head>
  11.   <body>
  12.     <div class="container">
  13.         <p class="bg-primary">This is bg-primary</p>
  14.         <p class="bg-danger">This is bg-danger</p>
  15.         <p class="bg-success">This is text-success</p>
  16.         <p class="bg-secondary">This is bg-secondary</p>
  17.         <p class="bg-info">This is bg-info</p>
  18.         <p class="bg-dark">This is bg-dark</p>
  19.         <p class="bg-warning">This is bg-warning</p>
  20.         <p class="bg-light">This is bg-light</p>
  21.     </div>
  22.     <!-- here Optional JavaScript -->
  23.     <!-- here jQuery first, then Popper.js, then Bootstrap JS -->
  24.     <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
  25.     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
  26.     <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
  27.   </body>
  28. </html>

 

Example:

 

 

Bootstrap 4 bg, Bootstrap bg, Bootstrap text color, text style, Bootstrap color, Bootstrap 4 color

 

THANK YOU...........