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 trialAgnes Caringal
6,239 Pointsguys anyone can help me regarding Sass...about complement...thanks
Set a variable named $complement to be the complement of standard red.
13 Answers
Colin Marshall
32,861 PointsTo get the complement of a color, you run the complement function on the color. Here's how it would look if you set a variable to the return value of the complement function:
$variable: complement($color);
Replace $variable with the name of the variable you are using and replace $color with the color you want the complement of.
Agnes Caringal
6,239 Pointserror my 2nd challenge Colin Marshall
Colin Marshall
32,861 PointsCan you link me to the challenge please?
Agnes Caringal
6,239 Points$text-color: red; $variable: complement($text-color);
a { color: lighten($text-color, 5%); }
Agnes Caringal
6,239 Pointschallenge no# 1 is done, the 2nd question is about complement
Colin Marshall
32,861 PointsPlease provide the URL to the code challenge so I can help you.
Colin Marshall
32,861 PointsYour error is that you are setting the result of the complement function to $variable instead of to $complement. I only used $variable in my example so that I wasn't just giving you the answer. You don't need to set red to a variable either.
$complement: complement(red);
Agnes Caringal
6,239 Pointswhat's the problem with this code?
Colin Marshall
32,861 PointsDid you try my most recent answer? Look up one answer from this one.
Agnes Caringal
6,239 Pointsyes, its running,
Agnes Caringal
6,239 Pointsnow, i dont know what's the problem
Colin Marshall
32,861 PointsFor question #3? The link will just take you to the beginning of a challenge, it won't take you to a specific question in the challenge. Please provide your code, formatted like this:
```scss
/* code goes here */
```
Colin Marshall
32,861 PointsPlease provide me with the question number you are on, not the link. And please provide me with your code that is not passing the question for that challenge.
Watch the video in the right sidebar called "Tips for asking questions" to see how to post code on the forum.
Agnes Caringal
6,239 PointsSet the background of <a> tag to be 10% desaturated version of a variable using the desaturate function. (HINT: desaturate works a lot like the lighten function - taking a color and, then a percentage. ok, thanks for you advice.
Colin Marshall
32,861 PointsOk, so question #3 is the one you are on. Now please provide me with your code so I can see where you are going wrong.
Agnes Caringal
6,239 Points/* challenge #3 */
$desaturate: desaturate(red, 10%);
a {
background: $desaturate;
}
Colin Marshall
32,861 PointsYou are close, you need to desaturate the complement of red.
$complement: complement(red);
a {
color: lighten(red, 5);
background: desaturate($complement, 10);
}
Also, please watch the video "Tips for asking questions" in the right sidebar of this page to see how to properly post code on the forum.
Agnes Caringal
6,239 Pointswow...your so great! you know a lot of Sass technique...thanks
Jason Gutierrez
10,032 PointsI agree and his answer just helped me out as well. Thanks for the help Colin.
MUZ140175 Tendayi Musvibe
7,296 PointsThis challenge has been difficult.But i latter realized that i was failing a small part which is on the challenge number 3.It was a bit tricky but finally i picked it.Well done TeamTreehouse.