Module 9 / Gradients and Blending
Module 9 · Application

Gradients and Blending

Creating smooth transitions without muddy middles.

0/2 lessons

Linear vs Radial

Learn

Linear gradients transition colors along a straight line. They are excellent for indicating flow, simulating directional light, or providing a subtle background wash.

Radial gradients radiate outward from a central point. They are perfect for creating a focal point—putting a lighter radial gradient behind a product image immediately draws the user's eye to the center.

Practice
Loading…
Recall0/1
Recall

Which type of gradient is typically best for creating a spotlight effect behind a central product image?

The Grey Dead Zone

Learn

When you create a gradient between two complementary colors (like blue and yellow) in standard sRGB, the math interpolates straight through the middle of the color wheel. The result? A muddy, desaturated grey dead zone in the middle of your vibrant gradient.

To fix this, you can manually add a midpoint color (e.g., adding pink between blue and yellow), or in modern CSS, you can tell the browser to interpolate in `oklch` or `hsl`, which travels *around* the perimeter of the color wheel, keeping saturation high.

/* The old way (muddy middle) */ background: linear-gradient(to right, blue, yellow); /* The modern way (vibrant, no grey zone) */ background: linear-gradient(in oklch to right, blue, yellow);
Practice
Loading…
Recall0/1
Recall

What causes the 'grey dead zone' in a CSS gradient?