Skip to content Skip to main navigation Report an accessibility issue

Context Colors

Documentation

Do
  • Color can convey information, it should not be used as decoration.
Don’t
  • Do not rely only on color to convey information. This can cause accessibilty problems or become meaningless when printed to a black and white printer. For example, when giving a warning be sure to state it with icons or text as well as changing it’s color.

Example

The Form Got Finished!

There were mistakes.

You forgot to fill in these elements.

Will Robinson! Will Robinson!

Code

HTML
<p class="text-success">The Form Got Finished!</p>
<p class="text-info">There were mistakes.</p>
<p class="text-warning">You forgot to fill in these elements.</p>
<p class="text-danger">Will Robinson! Will Robinson!</p>