Color in CSS: using new spaces, functions, and techniques to make your site shine

Drupal Camp Asheville 2024 - July 12th-14th

Room
HeroDevs (229)
Start Time

Topics

Presenter(s)

Aubrey Sambor
of
Lullabot
Color in CSS: using new spaces, functions, and techniques to make your site shine with Aubry Sambor

When working with color on the web, we’ve always had a few choices: HEX, RGB, and HSL. In recent years, however, the color level 4 specification introduced a few newcomers: HWB, LCH, okLCH, LAB, and okLAB. What are these new color options, and what do they add to variety of color choices we already have? Let’s get nerdy about colors and the options we have today.
In this talk, I will discuss

  • What’s new in the CSS Color Module Levels 4 and 5
  • An overview of color spaces available today
  • How to use some of the new CSS color functions
  • Using CSS custom properties to change the values of color items within each color space
  • Ways to ensure the colors you use on your site are accessible by using prefers-contrast, light-dark, and other modern techniques

Attendees will come away from this session with a deeper knowledge of the new color spaces and CSS color functions to make adding color to your site even easier!

Session Slides