Using colored backgrounds and font in an online course is fine, but it should be done carefully. This video goes over the basic guidelines for the accessible use of color, and shows how to use the accessibility checker in Canvas to ensure that the use of color doesn't obstruct learning.