Member-only story
Designing with sharp gradients in CSS
How to use the CSS linear- and radial-gradient properties with ease
Sometimes, we encounter a paradox in design, such as a sharp gradient.
Smooth
Gradients are supposed to be smooth. A smooth gradient blends two or more colors together harmoniously, as in this example:
Example 1:
Sharp
A sharp gradient, on the other hand, is a gradient that does not have a smooth transition, but sharp changes of colors at a specified point. In example 2, we see 4 sharp gradients (first 3 colors, +1 at the right end) and one smooth gradient:
Example 2:
A sharp gradient is defined as a precise percentage value in the gradients flow that ends one color, and starts the next color.
In example 2, the first color #863416 ends at 70%, and the second color #cd704e starts at exactly the same value of 70%. Thus, we have…