Kevin Powell | A deep dive into CSS color-mix() @KevinPowell | Uploaded August 2023 | Updated October 2024, 6 hours ago.
Another feature making its way in from preprocessors like Sass, we can now mix colors in CSS!
In this one, I go over the basics of how it works, look at how we can play with the percentages, what happens when the percentages are below 100% total, how the different color models work, and how we can mix colors in different directions (which doesnβt sound like it should be a thing, but it is π ).
I also take a very quick look at how we can create color schemes by using color-mix() as well, to help show a little bit of a more practical example of it in action.
π Links
β Browser support for color-mix(): caniuse.com/mdn-css_types_color_color-mix
β All the codepens from this video: codepen.io/collection/BNOMbj
β CSS color-mix() on the Chrome Developers Blog: developer.chrome.com/blog/css-color-mix
β CSS color-mix() MDN article: developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix
β More on the different color models: developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb_color_model
β Timestamps
00:00 - Introduction
00:30 - The very basics
02:20 - Mixing specific percentages of each color
04:00 - When the percentages donβt equal 100%
05:35 - The color models
08:40 - lab, oklab, lch, and oklch
10:25 - mixing colors in different directions
14:32 - Creating a color scheme with color-mix(
#css
--
Come hang out with other dev's in my Discord Community
π¬ discord.gg/nTYCvrK
Keep up to date with everything I'm up to
β kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
πΊ twitch.tv/kevinpowellcss
---
Help support my channel
π¨βπ Get a course: kevinpowell.co/courses
π Buy a shirt: teespring.com/stores/making-the-internet-awesome
π Support me on Patreon: patreon.com/kevinpowell
---
My editor: VS Code - code.visualstudio.com
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Twitter: twitter.com/KevinJPowell
Codepen: codepen.io/kevinpowell
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
Another feature making its way in from preprocessors like Sass, we can now mix colors in CSS!
In this one, I go over the basics of how it works, look at how we can play with the percentages, what happens when the percentages are below 100% total, how the different color models work, and how we can mix colors in different directions (which doesnβt sound like it should be a thing, but it is π ).
I also take a very quick look at how we can create color schemes by using color-mix() as well, to help show a little bit of a more practical example of it in action.
π Links
β Browser support for color-mix(): caniuse.com/mdn-css_types_color_color-mix
β All the codepens from this video: codepen.io/collection/BNOMbj
β CSS color-mix() on the Chrome Developers Blog: developer.chrome.com/blog/css-color-mix
β CSS color-mix() MDN article: developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix
β More on the different color models: developer.mozilla.org/en-US/docs/Web/CSS/color_value#rgb_color_model
β Timestamps
00:00 - Introduction
00:30 - The very basics
02:20 - Mixing specific percentages of each color
04:00 - When the percentages donβt equal 100%
05:35 - The color models
08:40 - lab, oklab, lch, and oklch
10:25 - mixing colors in different directions
14:32 - Creating a color scheme with color-mix(
#css
--
Come hang out with other dev's in my Discord Community
π¬ discord.gg/nTYCvrK
Keep up to date with everything I'm up to
β kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
πΊ twitch.tv/kevinpowellcss
---
Help support my channel
π¨βπ Get a course: kevinpowell.co/courses
π Buy a shirt: teespring.com/stores/making-the-internet-awesome
π Support me on Patreon: patreon.com/kevinpowell
---
My editor: VS Code - code.visualstudio.com
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.
Twitter: twitter.com/KevinJPowell
Codepen: codepen.io/kevinpowell
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!