Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 :)