Ignoring saturation and assuming hue affects color
Confusing lightness with saturation
Thinking 0% saturation still shows color
4. Identify the error in this CSS rule:
p { color: hsl(360, 120%, 50%); }
medium
A. Missing semicolon after color property
B. Hue value cannot be 360
C. Lightness cannot be 50%
D. Saturation cannot be more than 100%
Solution
Step 1: Check hue value range
Hue can be 0 to 360 degrees; 360 is valid (same as 0).
Step 2: Check saturation and lightness ranges
Saturation must be between 0% and 100%; 120% is invalid.
Final Answer:
Saturation cannot be more than 100% -> Option D
Quick Check:
Saturation max is 100% in HSL [OK]
Hint: Saturation and lightness must be 0%-100% [OK]
Common Mistakes:
Thinking hue cannot be 360
Ignoring invalid saturation values
Assuming missing semicolon causes error here
5. You want to create a smooth color transition from red to green using HSL. Which CSS snippet correctly animates the hue from 0° to 120° while keeping saturation and lightness constant?
hard
A. @keyframes colorChange { from { color: hsl(0, 50%, 100%); } to { color: hsl(120, 50%, 100%); } }
B. @keyframes colorChange { from { color: hsl(0, 100%, 0%); } to { color: hsl(120, 100%, 0%); } }
C. @keyframes colorChange { from { color: hsl(0, 100%, 50%); } to { color: hsl(120, 100%, 50%); } }
D. @keyframes colorChange { from { color: hsl(0, 0%, 50%); } to { color: hsl(120, 0%, 50%); } }
Solution
Step 1: Understand the goal of smooth hue transition
Hue should animate from 0° (red) to 120° (green) with saturation and lightness fixed.
Step 2: Check each option's saturation and lightness
@keyframes colorChange { from { color: hsl(0, 100%, 50%); } to { color: hsl(120, 100%, 50%); } } keeps saturation 100% and lightness 50%, which produces vivid colors. Others have incorrect saturation or lightness values causing dull or black colors.
Final Answer:
@keyframes colorChange { from { color: hsl(0, 100%, 50%); } to { color: hsl(120, 100%, 50%); } } -> Option C
Quick Check:
Animate hue 0° to 120° with full saturation and medium lightness [OK]
Hint: Keep saturation and lightness constant for smooth hue animation [OK]
Common Mistakes:
Changing saturation or lightness during hue animation