0
0
SASSmarkup~5 mins

Complement and invert functions in SASS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AInverts the RGB values of a color
BChanges the alpha transparency
CReturns the color opposite on the color wheel
DLightens the color by 50%
Which Sass function creates a photographic negative of a color?
Ainvert()
Bdarken()
Clighten()
Dcomplement()
If you apply invert() to a fully transparent color, what happens to the transparency?
AIt becomes fully opaque
BIt stays the same
CIt becomes half transparent
DIt becomes fully transparent black
Which function would you use to find a color that contrasts well with a given color?
Adesaturate()
Binvert()
Csaturate()
Dcomplement()
What happens to the hue when you use complement() on a color?
AIt shifts by 180 degrees
BIt shifts by 90 degrees
CIt stays the same
DIt becomes grayscale
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.