Teal to white gradient
A smooth teal to white gradient in CSS, blended in OKLab so the middle stays clean. Change the angle, add colors and copy the code.
Colors
OKLab keeps the middle bright. sRGB is how old browsers blend and often turns gray in the middle.
CSS
background: linear-gradient(90deg, #008080, #3a8f8f, #5b9f9e, #77afae, #93bebe, #aecece, #c9dede, #e4efee, #ffffff);
background: linear-gradient(90deg in oklab, #008080, #ffffff);Tailwind CSS v4
bg-linear-90/oklab from-[#008080] to-[#ffffff]Colors along the gradient
How teal and white blend in each color space
The same two colors give a different middle depending on the space the browser blends in. These are the exact colors at 50%. These two colors blend almost the same way in every space: the middle is #93bebe in OKLab and #80c0c0 in sRGB, so any of them works.
| Blend in | Gradient preview | Middle color | Lightness | Chroma |
|---|---|---|---|---|
| OKLab | #93bebe | 77.2% | 0.046 | |
| OKLCH | #93bebe | 77.2% | 0.046 | |
| sRGB | #80c0c0 | 76.3% | 0.065 | |
| LCH | #93bebd | 77.1% | 0.046 | |
| HSL | #70cfcf | 79.7% | 0.091 |
Questions about this gradient
How do I make a teal to white gradient in CSS?
Use background: linear-gradient(90deg in oklab, #008080, #ffffff). Add a line before it with the sRGB version for very old browsers. Interpolation in OKLab works in all current browsers.
What color is halfway between teal and white?
Blended in OKLab, the color halfway between teal and white is #93bebe. A plain sRGB blend gives #80c0c0.
How do I make a teal to white gradient in Tailwind CSS?
In Tailwind CSS v4 use the classes bg-linear-90/oklab from-[#008080] to-[#ffffff].