Check out example codes for "bootstrap 4 text color". It will help you in understanding the concepts better.

Code Example 1

<p class="text-primary">Text with primary color</p>
<p class="text-secondary">Text with secondary color</p>
<p class="text-success">Text with success color</p>
<p class="text-danger">Text with danger color</p>
<p class="text-warning">Text with warning color</p>
<p class="text-info">Text with info color</p>
<p class="text-light bg-dark">Text with light color</p>
<p class="text-dark">Text with dark color</p>
<p class="text-muted">Text with muted color</p>
<p class="text-white bg-dark">Text with white color</p>

Code Example 2

<p class="text-primary">.text-primary</p>
<p class="text-secondary">.text-secondary</p>
<p class="text-success">.text-success</p>
<p class="text-danger">.text-danger</p>
<p class="text-warning">.text-warning</p>
<p class="text-info">.text-info</p>
<p class="text-light bg-dark">.text-light</p>
<p class="text-dark">.text-dark</p>
<p class="text-muted">.text-muted</p>
<p class="text-white bg-dark">.text-white</p>

Code Example 3

use something like :
<div class="container alert alert-success">
   <div class="row">
      <div class="col">I'm your content inside the grid!</div>

Code Example 4

<style type="text/css">
   body { background: navy !important; } /* Adding !important forces the browser to overwrite the default style applied by Bootstrap */

Code Example 5

<div class="p-3 mb-2 bg-primary text-white">.bg-primary</div>
<div class="p-3 mb-2 bg-secondary text-white">.bg-secondary</div>
<div class="p-3 mb-2 bg-success text-white">.bg-success</div>
<div class="p-3 mb-2 bg-danger text-white">.bg-danger</div>
<div class="p-3 mb-2 bg-warning text-dark">.bg-warning</div>
<div class="p-3 mb-2 bg-info text-white">.bg-info</div>
<div class="p-3 mb-2 bg-light text-dark">.bg-light</div>
<div class="p-3 mb-2 bg-dark text-white">.bg-dark</div>
<div class="p-3 mb-2 bg-white text-dark">.bg-white</div>

Learn ReactJs, React Native from