Color should not be the only way a message is conveyed. Contrast between colors should be used.
People who are blind, have low vision, or are colorblind might miss out on the meaning conveyed by particular colors.
For example, add an underline to color-coded hyperlink text so that people who are colorblind know that the text is linked even if they can’t see the color. For headings, consider adding bold or using a larger font.