Summary
In CSS terms, color capability is advancing rapidly. We looked at the basics of setting colors and alpha layers in CSS using hex and functional notation. We also considered how to make use of wider gamuts such as P3 and how to provide fallbacks in a couple of ways for older devices.
Later, we looked at the cutting-edge features of color. We looked at mixing colors with color-mix()
, creating a color relative to another with the relative color syntax, and we considered the shortcomings of the contrast-color()
function.
As this is such a dense topic, the following is a list of resources to read further on the topic. But that doesn’t mean we won’t look at color more. On the contrary, we will need it in the next chapter, Chapter 9, Creating Stunning Effects with CSS, where we will be looking at gradients, shapes, and so much more.