Color can be a helpful tool, but it can be problematic because users experience color differently—this may be through colorblindness, using a screen reader, or use of another device which may impact how color appears. Color should never be used as the only way to distinguish an object or text's meaning.
In this example, the graph is only using color to differentiate between the lines. This would not be understandable without the ability to perceive color.
In this example, the graph is now using both color and symbol to differentiate between the lines. This is now perceivable by those viewing in color and those not.
BAD: Read this article first
GOOD: Read this article first
BAD: Important Reminder!
GOOD: Important Reminder
In this example, the box color and text color fail the accessible color contrast test. It is too difficult to read the white font on teal background.
In this example, the box color and text color pass the accessible color contrast test. It is possible to read the black font on the teal background.