Recall & Review
beginner
What does the
complement() function do in Sass?The
complement() function returns the opposite color on the color wheel. It helps create contrasting colors by flipping the hue by 180 degrees.Click to reveal answer
beginner
How does the
invert() function work in Sass?The
invert() function reverses the red, green, and blue values of a color, producing its negative. It keeps the alpha (transparency) the same.Click to reveal answer
intermediate
What is the difference between
complement() and invert() in Sass?complement() changes the hue by 180° on the color wheel, creating a color opposite in tone. invert() flips the RGB values to create a photographic negative of the color.Click to reveal answer
beginner
Write a Sass code snippet to get the complement of
#3498db.$color: #3498db;
$complement-color: complement($color);
// $complement-color will be a color opposite to #3498db on the color wheel
Click to reveal answer
beginner
What visual effect does using
invert() on a color create?Using
invert() creates a color that looks like a photographic negative. Light colors become dark, and dark colors become light, but the transparency stays the same.Click to reveal answer
What does the Sass
complement() function do?✗ Incorrect
complement() flips the hue by 180 degrees to get the opposite color on the color wheel.
Which Sass function creates a photographic negative of a color?
✗ Incorrect
invert() reverses the RGB values, producing a negative of the color.
If you apply
invert() to a fully transparent color, what happens to the transparency?✗ Incorrect
The alpha (transparency) value remains unchanged when using invert().
Which function would you use to find a color that contrasts well with a given color?
✗ Incorrect
complement() gives a color opposite on the color wheel, which usually contrasts well.
What happens to the hue when you use
complement() on a color?✗ Incorrect
The hue shifts by 180 degrees to get the complementary color.
Explain in your own words how the
complement() and invert() functions differ in Sass.Think about color wheel vs RGB values.
You got /5 concepts.
Describe a real-life situation where you might use the
complement() function in a web design project.Think about how opposite colors catch attention.
You got /4 concepts.