Let us take example of a simple button. Based on the $theme-colors  set, buttons are generated for each theme color variant in scss/_button.scss  using button-variant  mixin. This mixin receives a background color for which we need to generate corresponding contrast text color using color-contrast  function. This function uses $min-contrast-ratio , which defaults to 4.5  to achieve WCAG 2 AA contrast ratio.

#bootstrap #accessibility #sass #html5 #wcag

How To Generate WCAG Compliant Contrast Color in Bootstrap
1.20 GEEK