Challenge - 5 Problems
Color Mastery Badge
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediate2:00remaining
What is the output color of this Sass code?
Given the Sass code below, what is the resulting color value of
$result?SASS
$base-color: #336699; $result: lighten($base-color, 20%);
Attempts:
2 left
💡 Hint
The lighten function makes the color closer to white by the given percentage.
✗ Incorrect
The lighten function increases the lightness of the base color by 20%, resulting in #99ccff.
🧠 Conceptual
intermediate2:00remaining
Which Sass function adjusts transparency?
Which Sass function below changes the transparency (alpha) of a color without altering its RGB values?
Attempts:
2 left
💡 Hint
Look for the function that reduces opacity by a given amount.
✗ Incorrect
The transparentize function reduces the opacity by the given amount, making the color more transparent.
❓ selector
advanced2:00remaining
Which Sass code produces a color 30% darker than #ffcc00?
Select the Sass code snippet that correctly creates a color 30% darker than
#ffcc00.Attempts:
2 left
💡 Hint
Darken reduces lightness, lighten increases it.
✗ Incorrect
darken(#ffcc00, 30%) reduces the lightness by 30%, making the color darker.
❓ rendering
advanced2:00remaining
What color does this Sass code output?
What is the resulting color of
$final-color after running this Sass code?SASS
$color1: #123456; $color2: #654321; $final-color: mix($color1, $color2, 25%);
Attempts:
2 left
💡 Hint
The mix function blends colors weighted by the third parameter.
✗ Incorrect
mix($color1, $color2, 25%) blends 25% of $color2 into $color1, resulting in #2a3f4a.
❓ accessibility
expert3:00remaining
Which Sass code ensures text color has enough contrast on a background?
Given a background color
$bg, which Sass code correctly sets $text-color to black or white depending on contrast for accessibility?SASS
$bg: #abcdef; $text-color: ???
Attempts:
2 left
💡 Hint
Lightness helps decide if background is light or dark.
✗ Incorrect
Using lightness($bg) > 50% checks if background is light, then sets text to black for contrast, else white.