Cotton Boll to Lavender (CSS) Gradient
CSS
background: linear-gradient(90deg, #e7effb 0%, #e6e6fa 100%);
From Cotton Boll (#E7EFFB) to Lavender (CSS) (#E6E6FA). The two hues are 24° apart on the color wheel, close enough that the blend stays clean without a muddy middle.
Colors along the gradient
| Name | HEX | RGB | HSL | CMYK | OKLCH | |
|---|---|---|---|---|---|---|
| Cotton Boll | #E7EFFB | 231, 239, 251 | 216°, 71%, 95% | 8, 5, 0, 2 | 95.0% 0.018 258 | |
| 25% (near Cotton Boll) | #E7EDFB | 231, 237, 251 | 222°, 71%, 95% | 8, 6, 0, 2 | 94.6% 0.020 267 | |
| 50% (near Cotton Boll) | #E7EBFB | 231, 235, 251 | 228°, 71%, 95% | 8, 6, 0, 2 | 94.2% 0.022 275 | |
| 75% (near Lavender (CSS)) | #E6E8FA | 230, 232, 250 | 234°, 67%, 94% | 8, 7, 0, 2 | 93.5% 0.024 281 | |
| Lavender (CSS) | #E6E6FA | 230, 230, 250 | 240°, 67%, 94% | 8, 8, 0, 2 | 93.1% 0.027 286 |
Halfway along, the gradient is #E7EBFB, closest to the named color Cotton Boll. The stops are mixed in RGB, the way browsers draw a linear gradient by default.
Text on this gradient
Black text reads best on both ends, so one text color works across the whole gradient. The two end colors have a contrast ratio of 1.06:1, so the change is gentle.
Other ways to use it
- Top to bottom:
linear-gradient(180deg, #e7effb, #e6e6fa) - Diagonal:
linear-gradient(135deg, #e7effb, #e6e6fa) - Radial, from the center out:
radial-gradient(circle, #e7effb, #e6e6fa) - Tailwind CSS:
bg-gradient-to-r from-[#e7effb] to-[#e6e6fa]
Gradients like this work well for page headers, buttons, cards and slide backgrounds. Keep body text on a solid color for the best readability.
Related gradients
Questions
What are the HEX codes of the Cotton Boll to Lavender (CSS) gradient?
It starts at #E7EFFB (Cotton Boll) and ends at #E6E6FA (Lavender (CSS)), with #E7EBFB in the middle.
How do I reverse the gradient?
Swap the two colors or change the angle from 90deg to 270deg: linear-gradient(270deg, #e7effb, #e6e6fa) runs from Lavender (CSS) on the left to Cotton Boll on the right.