Bootstrap 5 (BS5) and AMS Color Palettes

Be sure to monitor contrast ratios as you customize colors. As shown below, we have a contrast ratio for each of the main colors against white.

Color Standards FAQ

According to WCAG, what is the minimum contrast ratio against white?

Minimum Contrast Ratios

Reference: Contrast (Minimum) (Level AA)

  1. For normal text (below 18pt or below 14pt if bold):

    • 4.5:1 is the minimum contrast ratio required for WCAG AA compliance.
  2. For large text (18pt or larger, or 14pt bold or larger):

    • 3:1 is the minimum contrast ratio required for WCAG AA compliance.
  3. For graphical objects and user interface components (e.g., icons, buttons, borders):

    • 3:1 is the minimum contrast ratio required for WCAG AA compliance.
  4. WCAG AAA standards (higher level of accessibility):

    • 7:1 is required for normal text.
    • 4.5:1 is required for large text.
What are the Bootstrap 5 (BS5) standard theme colors?

Reference Documentation

Note: Conveying meaning to assistive technologies: Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies ? such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .visually-hidden class.

Bootstrap 5 uses a subset of all colors to create a smaller color palette for generating color schemes.

BS5 standard theme colors
Why use Bootstrap 5 Colors?

Bootstrap 5 Colors Are Tested for Accessibility

  • Bootstrap’s core colors are designed with contrast ratios in mind, ensuring they meet WCAG 2.1 standards.
  • Colors like primary, success, danger, warning, and info already align with accessibility best practices in many use cases.

Example:
Bootstrap’s $blue: #0d6efd has a contrast ratio of 4.5:1 against white, meeting the WCAG AA standard for normal text.

Benefit: Saves time?you're working with a color set already tested for contrast.


Consistency Across Components

  • Bootstrap’s utility classes (e.g., .text-primary, .bg-success) ensure a consistent design language across the UI.
  • If you introduce new colors without aligning them with Bootstrap’s palette, elements like buttons, alerts, badges, and form inputs may look out of place or create contrast issues.

Example:
If you use an off-brand orange (#e87722) without checking contrast, it may not be readable on both light and dark backgrounds.

Solution: Use Bootstrap’s existing colors for structure, and supplement them with accessible, high-contrast colors when needed.


WCAG Compliance & Color Blind Accessibility

  • Bootstrap colors are already optimized for color contrast, but they don’t cover all accessibility needs.
  • Color-blind-friendly augmentation is essential for distinguishing elements.

Example:
Instead of relying solely on Bootstrap’s $warning: #ffc107 (yellow), which has poor contrast against white (1.63:1):

  • Augment with a darker shade of yellow: $warning-alt: #e6a700;
  • Use non-color cues like underlines, icons, or patterns.

Benefit: Helps users with color vision deficiencies.


Future-Proofing & Scalability

  • By sticking to Bootstrap’s structured color system, your styles remain flexible and maintainable.
  • If Bootstrap updates its palette for better accessibility, your design won’t become outdated.

Example:
If Bootstrap 6 improves $primary for contrast, your theme can inherit the improvements automatically if built on top of Bootstrap’s variables.

Benefit: Ensures long-term accessibility without redesigning everything.


Final Thought: Balance Bootstrap’s Palette with Accessibility Enhancements

Bootstrap’s predefined colors help create a solid foundation for web accessibility.
Augment Bootstrap’s colors responsibly by checking contrast and ensuring color-blind accessibility.
Stick to Bootstrap’s color structure to maintain consistency, readability, and ease of use.

The goal isn’t just to make it look good, but to make it usable for everyone!

Show me the complete set of variables that make up the AMS and Bootstrap 5 (BS5) color palette

/* BS5 Primary Colors */    
--blue: #0d6efd;        /* RGB(13, 110, 253) */
--indigo: #6610f2;      /* RGB(102, 16, 242) */
--purple: #6f42c1;      /* RGB(111, 66, 193) */
--pink: #d63384;        /* RGB(214, 51, 132) */
--red: #dc3545;         /* RGB(220, 53, 69)  */
--orange: #fd7e14;      /* RGB(253, 126, 20) */
--yellow: #ffc107;      /* RGB(255, 193, 7)  */
--green: #198754;       /* RGB(25, 135, 84)  */
--teal: #20c997;        /* RGB(32, 201, 151) */
--cyan: #0dcaf0;        /* RGB(13, 202, 240) */
    
/* BS5 Grayscale colors */     
--white: #ffffff         /* RGB(255, 255, 255) */
--black: #000000;        /* RGB(0, 0, 0) */
--gray-100: #f8f9fa;     /* RGB(245, 249, 250) */
--gray-200: #e9ecef;     /* RGB(233, 236, 239) */
--gray-300: #dee2e6;     /* RGB(222, 226, 230) */
--gray-400: #ced4da;     /* RGB(206, 212, 218) */
--gray-500: #adb5bd;     /* RGB(173, 181, 189) */
--gray-600: #6c757d;     /* RGB(108, 117, 125) */
--gray-700: #495057;     /* RGB(73, 80, 87) */
--gray-800: #343a40;     /* RGB(52, 58, 64) */
--gray-900: #212529;     /* RGB(33, 37, 41) */

 /* AMS Primary Colors */
--ams-gray: #98a4ae;        /* RGB(152, 164, 174) */
--ams-blue: #0057b8;        /* RGB(0, 87, 184) */
--ams-orange: #e87722;      /* RGB(232, 119, 34) */
    
 /* AMS Secondary Colors */    
--ams-cyan: #0cb7e1;        /* RGB(12, 183, 225) */
--ams-yellow: #ffc222;      /* RGB(255, 194, 34) */
--ams-lime: #97d700;        /* RGB(151, 215, 0) */
--ams-green: #3b8352;       /* RGB(59, 131, 82) */
--ams-red: #d9465a;         /* RGB(217, 70, 90) */
--ams-peach: #f7955b;       /* RGB(247, 149, 91) */

/* AMS colorblind Colors */    
--ams-colorblind-black: #231f20;        /* RGB(35, 31, 32) */
--ams-colorblind-orange: #f7941d;       /* RGB(247, 148, 29) */
--ams-colorblind-sky-blue: #00b9f2;     /* RGB(0, 185, 242) */
--ams-colorblind-bluish-green: #00a875; /* RGB(0, 168, 117) */
--ams-colorblind-yellow: #ecde38;       /* RGB(236, 222, 56) */
--ams-colorblind-blue: #0072bc;         /* RGB(0, 114, 188) */
--ams-colorblind-vermillion: #f15a22;   /* RGB(241, 90, 34) */
--ams-colorblind-reddish-purple: #cc79a7; /* RGB(204, 121, 167) */

Why Use Bootstrap 5?s Default Color Palette for Web Accessibility (and Augment It as Needed)?

Bootstrap 5 provides a predefined color palette optimized for usability and consistency. When working towards web accessibility, using this palette?while carefully augmenting it with additional accessible colors?ensures better readability, contrast, and user experience. Here?s why it?s important:

BS5 Named Theme Colors BS5Theme.ase (right click » to save Adobe Swatch Exchange file)

Reference BS5 color documentation.

# Variable Name Hex Color Contrast Ratio Against White WCAG AA Web Aim Contrast Checker
1 $blue #0d6efd Color Swatch 4.5 Pass Prove it
2 $indigo #6610f2 Color Swatch 7.19 Pass Prove it
3 $purple #6f42c1 Color Swatch 6.51 Pass Prove it
4 $pink #d63384 Color Swatch 4.5 Pass Prove it
5 $red #dc3545 Color Swatch 4.53 Pass Prove it
6 $orange #fd7e14 Color Swatch 2.57 Fail Prove it
7 $yellow #ffc107 Color Swatch 1.63 Fail Prove it
8 $green #198754 Color Swatch 4.53 Pass Prove it
9 $teal #20c997 Color Swatch 2.12 Fail Prove it
10 $cyan #0dcaf0 Color Swatch 1.95 Fail Prove it

Values

BS5 Mapping

                   
$blue:    #0d6efd;
$indigo:  #6610f2;
$purple:  #6f42c1;
$pink:    #d63384;
$red:     #dc3545;
$orange:  #fd7e14;
$yellow:  #ffc107;
$green:   #198754;
$teal:    #20c997;
$cyan:    #0dcaf0;   


$primary:       $blue;
$secondary:     $gray-600;
$success:       $green;
$info:          $cyan;
$warning:       $yellow;
$danger:        $red;
$light:         $gray-100;
$dark:          $gray-900;
$white:         #fff;

BS5 Grayscale Named Colors BS5Grayscale.ase (right click » to save Adobe Swatch Exchange file)

Reference BS5 all color documentation.

# Variable Name Hex Color Contrast Ratio Against White WCAG AA Web Aim Contrast Checker
11 $gray-100 #f8f9fa Color Swatch 1.05 Fail Prove it
12 $gray-200 #e9ecef Color Swatch 1.18 Fail Prove it
13 $gray-300 #dee2e6 Color Swatch 1.3 Fail Prove it
14 $gray-400 #ced4da Color Swatch 1.49 Fail Prove it
15 $gray-500 #6c757d Color Swatch 4.68 Pass Prove it
16 $gray-600 #6c757d Color Swatch 4.69 Pass Prove it
17 $gray-700 #495057 Color Swatch 8.18 Pass Prove it
18 $gray-800 #343a40 Color Swatch 11.51 Pass Prove it
19 $gray-900 #212529 Color Swatch 15.43 Pass Prove it
20 $black #000000 Color Swatch 21 Pass Prove it

Values

BS5 Mapping

                   
--gray-100: #f8f9fa;
--gray-200: #e9ecef;
--gray-300: #dee2e6;
--gray-400: #ced4da;
--gray-500: #adb5bd;
--gray-600: #6c757d;
--gray-700: #495057;
--gray-800: #343a40;
--gray-900: #212529; 
--black: #000000;


$gray-100: #f8f9fa 
$gray-200: #e9ecef 
$gray-300: #dee2e6 
$gray-400: #ced4da 
$gray-500: #adb5bd 
$gray-600: #6c757d 
$gray-700: #495057 
$gray-800: #343a40 
$gray-900: #212529
$black:    #000

AMS Brand Color Palette AMSBrandColors.ase (right click » to save Adobe Swatch Exchange file)

Reference: AMS Color Formulas (PDF file)

# Variable Name Hex Color Contrast Ratio Against White WCAG AA Web Aim Contrast Checker
21 $ams-gray #98a4ae Color Swatch 2.54 Fail Prove it
22 $ams-blue #0057b8 Color Swatch 6.87 Pass Prove it
23 $ams-orange #e87722 Color Swatch 2.96 Fail Prove it
24 $ams-cyan #0cb7e1 Color Swatch 2.36 Fail Prove it
25 $ams-yellow #ffc222 Color Swatch 1.61 Fail Prove it
26 $ams-lime #97d700 Color Swatch 1.74 Fail Prove it
27 $ams-green #3b8352 Color Swatch 4.61 Pass Prove it
28 $ams-red #d9465a Color Swatch 4.22 Fail Prove it
29 $ams-peach #f7955b Color Swatch 2.23 Fail Prove it

Values


--ams-gray: #98a4ae;        /* RGB(152, 164, 174) */
--ams-blue: #0057b8;        /* RGB(0, 87, 184) */
--ams-orange: #e87722;      /* RGB(232, 119, 34) */
--ams-cyan: #0cb7e1;        /* RGB(12, 183, 225) */
--ams-cyan: #0cb7e1;        /* RGB(12, 183, 225) */
--ams-yellow: #ffc222;      /* RGB(255, 194, 34) */
--ams-lime: #97d700;        /* RGB(151, 215, 0) */
--ams-green: #3b8352;       /* RGB(59, 131, 82) */
--ams-red: #d9465a;         /* RGB(217, 70, 90) */
--ams-peach: #f7955b;       /* RGB(247, 149, 91) */

AMS Color-Blind Palette ColorBlind.ase (right click » to save Adobe Swatch Exchange file)

Reference: AMS Color-blind Formulas (PDF file)

# Variable Name Hex Color swatch Empty
30 $-ams-colorblind-black #231f20    
31 $--ams-colorblind-orange #f7941d    
32 $--ams-colorblind-sky-blue #00b9f2    
33 $--ams-colorblind-bluish-green #00a875    
34 $--ams-colorblind-yellow #ecde38    
35 $-ams-colorblind-blue #0072bc    
36 $--ams-colorblind-vermillion #f15a22    
37 $--ams-colorblind-reddish-purple #005baa    

Values


$--ams-colorblind-black: #231f20;
$--ams-colorblind-orange: #f7941d;
$--ams-colorblind-sky-blue: #00b9f2;
$--ams-colorblind-bluish-green: #00a875;
$--ams-colorblind-yellow: #ecde38;
$--ams-colorblind-blue: #0072bc;
$--ams-colorblind-vermillion: #f15a22;
$--ams-colorblind-reddish-purple: #005baa; 

Image that shows how the palette looks when color appears weak
Image that shows how the palette looks when color is greatly reduced
Image that shows how the palette looks when green appears weak
Image that shows how the palette looks when green is greatly reduced
Image that shows how the palette looks when red appearsweak
Image that shows how the palette looks when redis greatly reduced
Image that shows how the palette looks when blue appears weak
Image that shows how the palette looks when blue is greatly reduced

Quick Reference Table

Silktide Label Clinical/Technical Name Approx. Prevalence
Color greatly reduced Achromatopsia ~1 in 10,000 ? 1 in 100,000 (Silktide uses 1 in 10M)
Color appears weak Achromatomaly Extremely rare (Silktide uses 1 in 10M)
Green appears weak Deuteranomaly ~1 in 20
Green greatly reduced Deuteranopia ~1 in 100
Red appears weak Protanomaly ~1 in 100
Red greatly reduced Protanopia ~1 in 100
Blue appears weak Tritanomaly ~1 in 100,000
Blue greatly reduced Tritanopia ~1 in 100,000

Note 1: Actual prevalence statistics vary in different sources. Silktide's figures are approximations to illustrate the rarity or commonness of each condition. The general ranking (most common: deuteranomaly; least common: tritanopia/achromatopsia) does align with known data.

Note 2: See Silktide and see the Chrome store for the browser plugin

Note 3: Below is how Silktide's plugin labels the different simulated types of color blindness, along with the more commonly used clinical terms and approximate prevalence. The parenthetical names (protanopia, deuteranomaly, etc.) are the usual labels you'll see in accessibility tools or medical references:

  1. Color greatly reduced: 1 in 10,000,000

    • Achromatopsia (Monochromacy)
    • This is an extremely rare condition in which a person has very little or no ability to perceive color at all.
  2. Green appears weak: 1 in 20

    • Deuteranomaly
    • The most common type of color blindness, where green cones in the eye function abnormally, making greens look more "washed out."
  3. Green greatly reduced: 1 in 100

    • Deuteranopia
    • The complete absence or non-functioning of the green cones, causing difficulty distinguishing reds and greens.
  4. Red appears weak: 1 in 100

    • Protanomaly
    • A reduced sensitivity to red light, making reds appear "weak" or faded.
  5. Red greatly reduced: 1 in 100

    • Protanopia
    • A more severe red-color deficiency, where red cones are absent or non-functioning.
  6. Blue appears weak: 1 in 100,000

    • Tritanomaly
    • A rare condition where the blue cones do not function properly, causing blues and yellows to be harder to distinguish.
  7. Blue greatly reduced: 1 in 100,000

    • Tritanopia
    • The almost complete absence of blue cones, making it difficult to distinguish between blue and yellow hues.
  8. Color appears weak: 1 in 10,000,000

    • Achromatomaly (Incomplete Achromatopsia)
    • An extremely rare form of partial color blindness in which all colors are muted. It's less severe than full achromatopsia but still uncommon.