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

Stuck on SASS Color Palette Challenge Task 2

Challenge 2 of 3 Set a variable "$complement" to be the complement of the standard red.

my answer:

$text-color: #FF0000; $complement: complement($text-color);

a { color: lighten($text-color, 5%);

}

i got this:

Bummer! You need to get the complement of the CSS color red.

what i'm doing wrong?

thanks

9 Answers

This is probably redundant, but here is what I did.

$text-color: red; $complement: complement(red);

a { color: lighten($text-color, 5%); }

Ginelle Sutherland
Ginelle Sutherland
12,807 Points

The answer is simple this ~ $complement: complement (red);

It took me a while to get it too :)

Correct Answer is:

$text-color: red; $lighter-red: lighten($text-color, 5%); $complement: complement(red);

a { color: $lighter-red; }

Tom Bedford
Tom Bedford
15,645 Points

It may be being picky as you wrote out the hex value rather than "red".

Or, if you are meant to complement red specifically rather than the already set $text-colour (even though that is also red).

Thank you guys !

You're welcome! Glad I could help! =)

$complement: complement (red);

Jean-Pierre Robak
Jean-Pierre Robak
5,288 Points

if for arguments sake i also assigned $text-color as red, then why does $complement: complement($text-color); not work, why do you HAVE to use $complement: complement(red); ? I'm very confused...