Eleven gradients for banners, cards and notices, with the text color each one carries.Every point of every gradient is measured against its text, in the sRGB a browser falls back to and in the OKLab it is shipped in, so the number given is the worst a reader can meet.
The eleven, as shipped. Select one to see it measured.
Choose a gradient, the space it is blended in and the size of the text.The chart under the banner is the contrast at each point along the gradient; the shaded stretches fail.
The controls need JavaScript. Without it the banner shows Indigo to violet, blended in OKLab, measured for body text.
Gradient
Blended in
Text
Spring sale ends Sunday
Every plan is 40% off when you pay for a year.
See the plans→
Contrast with the text along the gradient line, start to end
15:17:14.5:11:1
Lowest contrast
7.10:1at99%of the line
Passes along
100%of the line
Verdict
Passes everywhere
Passes everywhereFails somewhere
The measure is the gradient as a browser paints it: blended in the space named, rounded to 8 bits, sampled at least twice a pixel along a 1200 by 400 banner.Body text needs 4.5:1 and large text 3:1, under WCAG 1.4.3.
Text anywhere
Eight that carry text anywhere
Each passes 4.5:1 at its worst point, in sRGB and in OKLab, so body text can go anywhere on it.Seven pass 7:1, the AAA level.
Indigo to violet
Text anywhere, AAA
Spring sale ends Sunday
Every plan is 40% off when you pay for a year.
See the plans→
Worst point
7.10:1sRGB,at99%
sRGB
7.10:1
OKLab
7.10:1
OKLCH
7.10:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #312E81, #6D28D9);
background: linear-gradient(135deg in oklab, #312E81, #6D28D9);
color: #FFFFFF;
}
Ember
Text anywhere, AAA
Maintenance tonight
Sign-in is unavailable from 01:00 to 02:00 UTC.
Read the notice→
Worst point
7.30:1sRGB,at1%
sRGB
7.30:1
OKLab
7.30:1
OKLCH
7.29:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #9A3412, #9F1239);
background: linear-gradient(to right in oklab, #9A3412, #9F1239);
color: #FFFFFF;
}
Forest
Text anywhere, AAA
Your order is on its way
It should arrive on Thursday.
Track the parcel→
Worst point
7.07:1OKLab,at99%
sRGB
7.07:1
OKLab
7.07:1
OKLCH
7.07:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #14532D, #3F6212);
background: linear-gradient(135deg in oklab, #14532D, #3F6212);
color: #FFFFFF;
}
Ocean
Text anywhere, AA
Join the webinar
Color for dashboards, live on Tuesday at 16:00.
Save a seat→
Worst point
5.35:1sRGB,at99%
sRGB
5.35:1
OKLab
5.35:1
OKLCH
5.35:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #1E3A8A, #0E7490);
background: linear-gradient(to right in oklab, #1E3A8A, #0E7490);
color: #FFFFFF;
}
Auric night
Text anywhere, AAA
Members' preview
New palettes arrive here a week early.
Open the preview→
Worst point
7.18:1sRGB,at99%
sRGB
7.18:1
OKLab
7.18:1
OKLCH
7.18:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #332700, #6B5500);
background: linear-gradient(135deg in oklab, #332700, #6B5500);
color: #FFFFFF;
}
Dawn
Text anywhere, AAA
Get the weekly note
One short email on color and accessibility.
Subscribe→
Worst point
12.56:1sRGB,at99%
sRGB
12.56:1
OKLab
12.56:1
OKLCH
12.56:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #FEF3C7, #FBCFE8);
background: linear-gradient(to right in oklab, #FEF3C7, #FBCFE8);
color: #1C1A16;
}
Mist
Text anywhere, AAA
Tip
Press Ctrl+K to search every tool.
Show shortcuts→
Worst point
14.60:1sRGB,at94%
sRGB
14.60:1
OKLab
14.60:1
OKLCH
14.60:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #E0F2FE, #EDE9FE);
background: linear-gradient(135deg in oklab, #E0F2FE, #EDE9FE);
color: #1C1A16;
}
Butter to lilac
Text anywhere, AAA
Welcome aboard
Three steps set up your first palette.
Start→
Worst point
9.40:1sRGB,at99%
sRGB
9.40:1
OKLab
9.40:1
OKLCH
9.41:1
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #FDE68A, #C4B5FD);
background: linear-gradient(to right in oklab, #FDE68A, #C4B5FD);
color: #1C1A16;
}
The traps
Three that look as if they should
Each fails for a different reason: a stop that is too light, a blend that dims, and a space that lightens.Each card shows the measurement and a fix that passes in both spaces.
Navy to amber
Text on one side
As designedsRGB2.14:1OKLab2.14:1OKLCH2.14:1
What goes wrongWhite text passes on the left 49.5% of the line, then drops to 2.14:1 at the amber end.No space helps: the amber stop itself is too light.
Fixed
Summer festival tickets
On sale now, from the box office or online.
Buy tickets→
The fixKeep the text on the passing side: over the left 49% of the banner the worst point is 4.53:1, so the text column here is at most 45% wide.Or lay 33% black over the whole gradient, or move the amber stop to #A66900.
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #1E3A8A, #F59E0B);
background: linear-gradient(to right in oklab, #1E3A8A, #F59E0B);
color: #FFFFFF;
}
.banner .banner__text {
max-width: 45%; /* white text passes on the left 49% */
}
Pink to blue
Needs a fix
As designedsRGB4.15:1OKLab4.81:1OKLCH4.75:1
What goes wrongBoth ends pass, at 5.02:1 and 4.82:1, but the sRGB blend dims the middle to 4.15:1 at 49%.In OKLab it holds 4.81:1, yet a browser that cannot read in oklab shows the sRGB version.
Fixed
Launch week
Five new tools, one a day.
See what's new→
The fixLay 5% white over the gradient: the worst point in either space becomes 4.52:1.Or lighten the stops to#F14D9Eand#438AFF.
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(rgb(255 255 255 / 5%), rgb(255 255 255 / 5%)), linear-gradient(to right, #EC4899, #3B82F6);
background: linear-gradient(rgb(255 255 255 / 5%), rgb(255 255 255 / 5%)), linear-gradient(to right in oklab, #EC4899, #3B82F6);
color: #111827;
}
Green to magenta
Needs a fix
As designedsRGB3.29:1OKLab3.28:1OKLCH2.99:1
What goes wrongHere OKLab is the worse space: its middle turns lighter, and white text passes on only 10.8% of the line, against 73.9% in sRGB.In OKLCH the hue takes the short way round, through teal, and the lowest point falls to 2.99:1.
Fixed
Spring collection
Fresh colors for the new season.
Browse→
The fixLay 17% black over the gradient: the worst point in either space becomes 4.53:1.Or darken the green stop to #00883A.
CSS
.banner {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(rgb(0 0 0 / 17%), rgb(0 0 0 / 17%)), linear-gradient(to right, #16A34A, #C026D3);
background: linear-gradient(rgb(0 0 0 / 17%), rgb(0 0 0 / 17%)), linear-gradient(to right in oklab, #16A34A, #C026D3);
color: #FFFFFF;
}
Interpolation
The space can move the worst point
The same stops, blended in sRGB, OKLab and OKLCH, measured against the same text.Where they disagree by 0.05 or more, the lowest is underlined.
The lowest contrast of each gradient, blended in each space
For most gradients the space hardly matters.When both stops are dark, or both light, every space blends them to colors of about the same contrast: 9 of these 11 move by less than 0.05.
When the stops differ in hue and lightness, it decides.sRGB dims the middle of Pink to blue; OKLab and OKLCH lighten the middle of Green to magenta.Neither space is always the safer: measure the one you ship.
Measure the fallback too.A browser that cannot read an interpolation space drops the whole declaration, so ship the sRGB version first and check both.
The eight as CSS classes, or as a JSON list with each one's worst contrast.
Rename the classes to fit your system.
CSS classes
.gradient-indigo-violet {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #312E81, #6D28D9);
background: linear-gradient(135deg in oklab, #312E81, #6D28D9);
color: #FFFFFF;
}
.gradient-ember {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #9A3412, #9F1239);
background: linear-gradient(to right in oklab, #9A3412, #9F1239);
color: #FFFFFF;
}
.gradient-forest {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #14532D, #3F6212);
background: linear-gradient(135deg in oklab, #14532D, #3F6212);
color: #FFFFFF;
}
.gradient-ocean {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #1E3A8A, #0E7490);
background: linear-gradient(to right in oklab, #1E3A8A, #0E7490);
color: #FFFFFF;
}
.gradient-auric-night {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #332700, #6B5500);
background: linear-gradient(135deg in oklab, #332700, #6B5500);
color: #FFFFFF;
}
.gradient-dawn {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #FEF3C7, #FBCFE8);
background: linear-gradient(to right in oklab, #FEF3C7, #FBCFE8);
color: #1C1A16;
}
.gradient-mist {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(135deg, #E0F2FE, #EDE9FE);
background: linear-gradient(135deg in oklab, #E0F2FE, #EDE9FE);
color: #1C1A16;
}
.gradient-butter-lilac {
/* sRGB, for browsers that cannot read an interpolation space */
background: linear-gradient(to right, #FDE68A, #C4B5FD);
background: linear-gradient(to right in oklab, #FDE68A, #C4B5FD);
color: #1C1A16;
}
The measuring is the gradient contrast checker's: stops resolved by CSS's rules, blends premultiplied by alpha, each color rounded to 8 bits as a browser paints it, and contrast as the WCAG 2 ratio, floored to two decimals.Node tests recompute every number on this page.Checked with axe and the keyboard in Chromium; not yet tested with a screen reader.Last reviewed on 14 October 2026.
Found a mistake?Write to usand we will correct it.