Complete the code to lighten a color by 20%.
$light-blue: lighten([1], 20%);
The lighten() function makes the color lighter by the given percentage. Here, #0000ff is blue, which we lighten by 20%.
Complete the code to make a color 50% transparent.
$transparent-red: rgba([1], 0.5);
The rgba() function takes red, green, blue values and an alpha for transparency. Here, 255, 0, 0 is red, and 0.5 makes it 50% transparent.
Fix the error in the code to get the hue of a color.
$hue-value: hue([1]);hue().The hue() function requires a simple color value. Using #00ff00 (green) works correctly. Functions like lighten() or transparentize() return colors but can cause issues if nested improperly.
Fill both blanks to create a color with 30% saturation and 70% lightness.
$new-color: hsl([1], [2], 70%);
The hsl() function takes hue, saturation, and lightness. Here, hue is 120 (green), saturation is 30%, and lightness is 70%.
Fill all three blanks to create a color with hue 240, saturation 100%, and lightness 50%.
$color: hsl([1], [2], [3]);
The hsl() function uses hue, saturation, and lightness. Hue 240 is blue, saturation 100% is full color, and lightness 50% is normal brightness.