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

Luigi Rulloda
Luigi Rulloda
6,175 Points

Challenge task 3 of 3 please help

please help me figure this out

index.html
<!DOCTYPE html>
<html>
<head>
  <title>Sass Basics - Code Challenge</title>
  <link rel="stylesheet" type="text/css" href="page-style.css">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
  <h1>Hampton's Blog</h1>
  <div class="entry">
    <h1>Great Music</h1>
      <div class="content">
        <p>
            Here are some of my favorite bands from years past and present: Belle and Sebastian, Pixies, and Daft Punk. Listening to music allows me to focus when I'm programming. 
        </p>
      </div>
      <a href="/info.html">Read More &raquo;</a>
    </div>
</body>
</html>
style.scss
/* Write your SCSS code below. */
$text-color: lighten(#ff0000, 5%);
$complement: red;
$desaturate: desaturate( red, 10% );

a {
   color: $text-color;

}

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

2 Answers

Matthew Brock
Matthew Brock
16,791 Points

This is a badly written excersise

$text-color: lighten(#ff0000, 5%);
$complement: complement(red);            
$desaturate: desaturate( $complement, 10% );

a {
   color: $text-color;
   background: $desaturate;
}

they want you to take the complement of red and desaturate it. Then apply that value to the background

Gianmarco Mazzoran
Gianmarco Mazzoran
22,076 Points

Hi Luigi Rulloda,

first thing there's an error in your variable $complement: in this variable you need to call the function complementary().

/* Write your SCSS code below. */
$text-color: lighten(#ff0000, 5%);
$complement: complement(red); /* the variable $complement with the right function*/
$desaturate: desaturate( red, 10% );

a {
   color: $text-color;

}

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

The 3th task is asking you to desaturate the complementary color of red (which you have store in the $complementary variable) and desaturate it by 10%

/* Write your SCSS code below. */
$text-color: lighten(#ff0000, 5%);
$complement: complement(red); /* the variable $complement with the right function*/
$desaturate: desaturate($complement, 10% ); /*the complement color of red, that you have store in the variable before, desaturate by 10% */

/*down here you can simplify all in one selector */
a {
   color: $text-color;
   background-color: $desaturate; /* since you have store all in this variable you need simply to "call" them */
}