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

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! =)

ellie adam
ellie adam
26,376 Points

$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...