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 colormix() as well, to help show a little bit of a more practical example of it in action.
Links
✅ Browser support for colormix(): https://caniuse.com/mdncss_types_col...
✅ All the codepens from this video: https://codepen.io/collection/BNOMbj
✅ CSS colormix() on the Chrome Developers Blog: https://developer.chrome.com/blog/css...
✅ CSS colormix() MDN article: https://developer.mozilla.org/enUS/d...
✅ More on the different color models: https://developer.mozilla.org/enUS/d...
⌚ 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 colormix(
#css
Come hang out with other dev's in my Discord Community
/ discord
Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
/ kevinpowellcss
Help support my channel
Get a course: https://www.kevinpowell.co/courses
Buy a shirt: https://teespring.com/stores/makingt...
Support me on Patreon: / kevinpowell
My editor: VS Code https://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: / kevinjpowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevinpowell
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!