Challenge - 5 Problems
Sass Color Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
How does the lighten() function affect a color in Sass?
In Sass, what does the
lighten() function do to a given color?Attempts:
2 left
💡 Hint
Think about what happens when you add white to a color.
✗ Incorrect
The
lighten() function increases the lightness value of a color in HSL color space, making the color appear lighter or closer to white.📝 Syntax
intermediate2:00remaining
What is the output color of this Sass code?
Given the Sass code:
What is the hex value of
$color: #336699; $result: lighten($color, 20%);
What is the hex value of
$result?Attempts:
2 left
💡 Hint
Lighten increases lightness by 20%, so the color becomes lighter than #336699.
✗ Incorrect
Lightening #336699 by 20% results in #6699cc, a lighter blue shade.
❓ rendering
advanced2:00remaining
What color will be rendered by this Sass snippet?
Consider this Sass code:
Which color will
$base: #cc3300; $dark: darken($base, 30%);
Which color will
$dark represent when rendered in the browser?Attempts:
2 left
💡 Hint
Darken reduces lightness, making the color closer to black.
✗ Incorrect
Darkening #cc3300 by 30% results in #661a00, a much darker reddish-brown color.
❓ selector
advanced1:30remaining
Which Sass selector uses lighten() correctly to style a button hover?
You want to make a button's background color lighter on hover using Sass. Which selector and property usage is correct?
Attempts:
2 left
💡 Hint
Check the syntax for function arguments in Sass.
✗ Incorrect
The
lighten() function requires two arguments separated by a comma: the color and a percentage without quotes.❓ accessibility
expert2:30remaining
Why should you be cautious when using lighten() or darken() for accessibility?
When adjusting colors with
lighten() or darken() in Sass, what accessibility issue might arise?Attempts:
2 left
💡 Hint
Think about how color contrast affects readability.
✗ Incorrect
Lightening or darkening colors can reduce contrast between text and background, which can make content difficult to read for users with visual impairments.