Creative workflow

Compare sRGB and Oklab Interpolation in a CSS Gradient

A satin graphite ribbon passes across a translucent amber plane under soft light

The fictional Fieldnote campaign used a blue-to-amber gradient with a murky center. We kept the endpoints identical, changed the interpolation space in CSS and sampled both Chromium renders before bringing them into the production Ciyo canvas.

Quick answer

Compare linear-gradient(90deg in srgb, ...) with the same stops in oklab. Keep a compatible fallback declaration, check the midpoint and test the contrast of any overlaid text across its actual position.

Keep the endpoints and direction fixed

Choose the two actual brand colors and use the same angle, dimensions and stop positions. The fixture uses #174adb and #ecc450. Avoid changing the gradient direction or brightness in the same test.

Production canvas at the start

The reference Ciyo board shows the gradient rendered in explicit sRGB
Production canvas at the start

Declare each interpolation space explicitly

Use the in srgb syntax for the first render and in oklab for the second. Set a plain linear-gradient first as a fallback, then the intended interpolated declaration. Keep the fallbacks visible in your code and check the target browser behavior.

Measure the middle in the renderer that will ship it

Chromium sampled approximate midpoint RGB values of 130, 135, 149 for sRGB and 128, 148, 173 for Oklab. The difference is for this pair of endpoints and renderer. A different palette, device or capture path can produce a different comparison.

Production canvas after the comparison

Side-by-side sRGB and Oklab renders share the same blue and amber endpoints and differ in the middle
Production canvas after the comparison

Review the gradient where the text will sit

We placed the Oklab proof beside the matched sRGB render in Ciyo. Check the darkest and lightest area that real text crosses at both desktop and mobile widths. If contrast falls short, move the label, give it a legible backing or adjust the design and remeasure.

Example files

Sources and related reading

Quick questions

Does changing the interpolation space change the endpoints?

The specified stops stay fixed in this two-color example. The interpolation method changes the colors between them.

Will Oklab remove bands from a compressed export?

Banding can involve quantization or compression. Review the delivered image and consider export settings or dithering separately.

Try it on your canvas

Keep the input and reviewed result on separate layers so you can revisit the decision before handing off the final file.