From the course: Sass Essential Training
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Color functions - Sass Tutorial
From the course: Sass Essential Training
Color functions
- One of the ways that Sass is superior to CSS is the rich color functions that are available to you. To use them, you add the color modules, which, like the math modules, is an extremely large library. I'm just including some of the favorite ways to modify color here. So make sure you check the documentation for the complete list. Now, to start off you add the use at rule for Sass color. Once you have that, then you can add all these different color rules. So you can say color adjust, which is one of the more flexible rules and then also do things like darkened colors or lighten colors, or change their transparency values. Now, here's what something like that would look like. You add the use Sass color, and then I'm creating a color variable right here, and then we can call any one of these other methods. So you can have the color adjust here, takes the original color, and then you can control a number of parameters…
Contents
-
-
-
-
-
(Locked)
Interpolation2m 22s
-
(Locked)
Placeholder selectors1m 29s
-
(Locked)
Comments1m 52s
-
(Locked)
Using lists9m 21s
-
(Locked)
Each2m 47s
-
(Locked)
For2m 1s
-
(Locked)
Maps5m 1s
-
(Locked)
Operators and conditionals5m 57s
-
(Locked)
Color functions4m 27s
-
(Locked)
Challenge: Badges1m 36s
-
(Locked)
Solution: Badges8m 43s
-
(Locked)
-