Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Sass Basics (retired) Speeding up Workflow with Sass Creating a Color Palette

Neslee Rodillo
Neslee Rodillo
19,615 Points

confused 3 of 3

Where am I going wrong???

Question: Set the background of the <a> tag to be a 10% desaturated version of the variable, using the desaturate function. (HINT: desaturate works a lot like the lighten function - taking a color, then a percentage!)

My answer:

$complement: complement (red);
$desaturate: ($complement, 10%);

a {color: lighten(red, 5%); background: $desaturate ;}

Error: Bummer! Use the 'desaturate' function to desaturate the value in the $complement variable. Apply the result to the background attribute of 'a' tags.

4 Answers

Well, as the challenge states, you're supposed to use the desaturate function on the $complement variable, and it works just like lighten.

background: desaturate($complement, 10%);

Hi Neslee,

You haven't used the desaturate function. It would look similar to the lighten function.

$complement: complement(red);
$desaturate: desaturate($complement, 10%);
a {
  color: lighten(red, 5%);
  background: $desaturate;
}

The above works but you can also solve it like this and avoid the extra variable:

$complement: complement(red);
a {
  color: lighten(red, 5%);
  background: desaturate($complement, 10%);
}
Neslee Rodillo
Neslee Rodillo
19,615 Points

Thank you Dino and Jason for your help and clarification :)