title: Bootstrap 5 - Custom theme-colors not updating classes
body: <p>I have just started a new project using Bootstrap 5 and I am trying to set up theme-colors with some custom values. However doing it the way that I have always done it is giving me some issues.</p>
  <p>I have created three colors: $primary, $secondary, $tertiary. However if I add any classes such as bg-tertiary, then nothing changes as if it doesn't exist. bg-primary simply uses the default color defined by Bootstrap.</p>
  <p>My code below:</p>
  <pre><code>@import &quot;bootstrap/_functions&quot;;
  @import &quot;bootstrap/_variables&quot;;
  
  $primary: #ec008c;
  $secondary: #1ab7ea;
  $tertiary: #3fb247;
  
  $theme-colors: (
      &quot;primary&quot;: $primary,
      &quot;secondary&quot;: $secondary,
      &quot;tertiary&quot;: $tertiary,
      &quot;light&quot;: $light,
      &quot;dark&quot;: $dark,
  );
  
  @import &quot;bootstrap/bootstrap&quot;;
  </code></pre>
  <p>If I change a default value such as &quot;dark&quot; to use $tertiary then any code within the scss file using $dark changes to use the value from $tertiary. Like below:</p>
  <pre><code>$theme-colors(
      &quot;dark&quot;: $tertiary
  );
  
  #pageFooter {
     background: $dark; //This becomes #3fb247 the value from $tertiary
  }
  </code></pre>
  <p>What am I doing wrong? I can't understand why the variables in the scss file are being affected by the change to $theme-colors, but classes are not.</p>
  <p>Edit:</p>
  <p>Using chrome inspector I can see that .bg-primary uses a css variable --bs-primary-rgb. Looking at the available variables --bs-primary has changed to the color that I have set, but not --bs-primary-rgb.</p>
  <p>How can I have this variable be changed. Should it be done automatically?</p>
  <p>With further research these rgb variables appear to have been introduced in Bootstrap 5.1. I can't find much information about how to get the variable to update to my set values probably because it is too new. So I have chosen to revert back to 5.0.2 and everything is now working as I expect it to.</p>