Bootstrap 6 ยท Subject Guide
Colors & Themes
Semantic colors, theme variants, and color-scheme guidance.
Version note: Bootstrap 6 is alpha. These guides use the 6.0.0-alpha.1 CDN. Some class names from your notes may require a custom build or project CSS.
1. Semantic colors
Use colors consistently to communicate status and importance.
Primary
Success
Warning
Danger
Ready-to-use code
<div class="bg-primary text-white">Primary</div>
<div class="bg-success text-white">Success</div>
<div class="bg-warning text-dark">Warning</div>
<div class="bg-danger text-white">Danger</div>2. Theme success
Your notes include theme-success. This may be a custom theme utility. If your build does not define it, use standard Bootstrap success components or add your own CSS.
Success: changes saved.
Warning: review this item.
Error: operation failed.
Ready-to-use code
<div class="theme-success">Saved successfully.</div>
<!-- Standard Bootstrap alternative -->
<div class="alert alert-success">Saved successfully.</div>3. Color scheme
CSS color-scheme influences browser-rendered controls and widgets in light or dark contexts. Utility names may vary by build.
Ready-to-use code
/* CSS option */
.light-surface { color-scheme: light; }
.dark-surface { color-scheme: dark; }
/* Use a project utility only if it exists in your build. */