CSS Colors
By changing the color of the text with these utility classes, you can convey different meanings to users.
Example
.text-header
.text-navy
.text-success
.text-danger
.text-warning
.text-white
.text-caption
Note: The State of Michigan has its own selection of colors that it uses on its websites for branding and alert purposes. For more information on this, click here.
Background color
Like contextual text color classes, you can apply contextual classes to set the background of an element. It's worth noting that background utilities do not alter the color
property. Therefore, in specific scenarios, you may need to complement them with the .text-*
utilities.
Convey meaning
Utilizing color solely for conveying meaning offers a visual cue that may not be accessible to users of assistive technologies like screen readers. It is essential to guarantee that the information conveyed by the color is either explicitly evident from the content itself, such as visible text, or is supplemented through alternative methods, like incorporating additional text hidden with the .sr-only
class.
Do you have an idea, or want to help us improve this page? Reach out to us via email.
DTMB-DG-Support@michigan.govNeed help? Visit our Support page to learn how to get assistance, troubleshoot issues, and connect with the team.