0
0
SASSmarkup~10 mins

Saturate and desaturate in SASS - Browser Rendering Trace

Choose your learning style9 modes available
Render Flow - Saturate and desaturate
Read SCSS file
Parse variables and functions
Apply saturate() and desaturate() functions to colors
Generate CSS with modified colors
Browser loads CSS
Render elements with new colors
The SCSS compiler reads the file, applies saturate() and desaturate() color functions to adjust color intensity, then outputs CSS. The browser renders elements using these adjusted colors.
Render Steps - 3 Steps
Code Added:Base box with background-color: #6699cc
Before
[__________]
|          |
|          |
|          |
|__________|
(Color: #6699cc, medium blue, normal saturation)
After
[__________]
|          |
|          |
|          |
|__________|
(Color: #6699cc, medium blue, normal saturation)
The box appears with the base blue color, showing the starting point before saturation changes.
🔧 Browser Action:Paints element with base color
Code Sample
Two boxes show the same base color but one is more vivid (saturated) and the other is more muted (desaturated).
SASS
<div class="box saturate">Saturated Color</div>
<div class="box desaturate">Desaturated Color</div>
SASS
$base-color: #6699cc;

.box {
  width: 10rem;
  height: 5rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

.saturate {
  background-color: saturate($base-color, 30%);
}

.desaturate {
  background-color: desaturate($base-color, 30%);
}
Render Quiz - 3 Questions
Test your understanding
After applying saturate($base-color, 30%) in step 2, how does the box color change visually?
AThe blue color becomes lighter and more pastel
BThe blue color becomes more vivid and intense
CThe blue color becomes darker and muted
DThe blue color changes to red
Common Confusions - 2 Topics
Why does saturate() sometimes not make the color look brighter?
Saturate only increases the color's intensity, not its brightness. If the color is already very bright or pale, saturation changes might be subtle.
💡 Saturation affects vividness, not lightness or darkness.
Why does desaturate() make colors look grayish but not fully gray?
Desaturate reduces color intensity but keeps some hue. To get full gray, you need to remove saturation completely or use grayscale.
💡 Desaturate softens color but doesn't remove hue entirely.
Property Reference
FunctionParameterEffect on ColorVisual ResultCommon Use
saturate(color, amount%)amount% (e.g., 30%)Increases color saturationColor looks more vivid and intenseMake colors pop or look brighter
desaturate(color, amount%)amount% (e.g., 30%)Decreases color saturationColor looks duller and mutedCreate subtle, soft, or grayish colors
Concept Snapshot
saturate(color, amount%) increases color intensity, making it more vivid. desaturate(color, amount%) decreases color intensity, making it more muted. Both adjust saturation without changing brightness. Use saturate to make colors pop, desaturate for softer looks. Commonly used in SCSS for dynamic color styling.