Colour to colour

Khaki to Lilac gradient

Khaki (#f0e68c) into Lilac (#c8a2c8) — 137° apart on the OKLCH hue wheel. Below: the same two stops interpolated in OKLab and in OKLCH, side by side, because the difference is real and most generators never let you see it; then an eased version and a mesh, each with the worst-case contrast for white and black text. The engine's own pick for this pair is oklab — both colours are in the palette and the hue gap is small enough that the straight line stays clean.

Khaki → Lilac
black text · worst 9.46:1 · AA
white 1.28 failsblack 9.46 AAbanding high

OKLab and OKLCH, side by side

Aa

A straight line through the a/b plane: the two hues meet halfway and desaturate a little at the midpoint. The safe default — it is what CSS and Tailwind default to.

white 1.28 failsblack 9.46 AAbanding high
css
linear-gradient(135deg in oklab, #f0e68c 0%, #c8a2c8 100%)
Aa

OKLCH (shorter hue)

Open in maker →

Chroma and hue interpolate separately, so the midpoint keeps its saturation and the hue travels the short way round the wheel — richer, and it can pass through hues neither colour has.

white 1.28 failsblack 9.46 AAbanding high
css
linear-gradient(135deg in oklch shorter hue, #f0e68c 0%, #c8a2c8 100%)

And the sRGB line most tools draw, for comparison — the number is the chroma that survives at the dullest point.

sRGB37%
OKLab35%
OKLCH76%

Eased and mesh

Aa

Eased (soft)

Open in maker →

A cubic-bezier(.4, 0, .6, 1) mix ratio baked into 15 stops: the transition lingers on each colour and moves faster through the middle, which is what makes a gradient read as designed rather than default.

white 1.28 failsblack 9.46 AAbanding high
css
linear-gradient(135deg in oklab, #f0e68c 0%, #efe58d 8.28%, #eee291 16.03%, #ebde96 23.35%, #e8d99c 30.32%, #e4d3a2 37.03%, #e0cca9 43.56%, #dbc5af 50%, #d7beb5 56.44%, #d3b7ba 62.97%, #d0b0bf 69.68%, #ccaac3 76.65%, #caa6c6 83.97%, #c9a3c7 91.72%, #c8a2c8 100%)
Aa

Both colours as stacked radials over a base, laid out by a seeded Poisson-disc sampler — the same seed gives the same mesh forever. Exports as CSS, SVG and PNG.

white 1.38 failsblack 10.88 AAbanding high
css
background-color: #dbc5af;
background-image: radial-gradient(circle farthest-corner at 83.18% 78.59%, rgba(240, 230, 140, 0.746) 0%, rgba(240, 230, 140, 0) 54.24%), radial-gradient(circle farthest-corner at 23.15% 52.64%, rgba(200, 162, 200, 0.837) 0%, rgba(200, 162, 200, 0) 57.53%);
background-image: radial-gradient(circle farthest-corner at 83.18% 78.59%, oklch(from #f0e68c l c h / 0.7461) 0%, rgb(from #f0e68c r g b / 0) 54.24%), radial-gradient(circle farthest-corner at 23.15% 52.64%, oklch(from #c8a2c8 l c h / 0.8369) 0%, rgb(from #c8a2c8 r g b / 0) 57.53%);

Report

  • white ink: worst 1.28:1 at 1% (fails AA); black ink: worst 9.46:1 at 100% (AA) → use black text.
  • Banding high: ~21px bands at 1440px — add grain 41 (≈3% soft-light noise) or shorten the ramp.

Export

css
.gradient {
  background-image: linear-gradient(135deg, #f0e68c 0%, #ede192 7.14%, #eadd98 14.29%, #e7d89d 21.43%, #e4d3a2 28.57%, #e1cea6 35.71%, #decaab 42.86%, #dbc5af 50%, #d9c0b3 57.14%, #d6bbb7 64.29%, #d3b6bb 71.43%, #d0b1be 78.57%, #cdacc2 85.71%, #cba7c5 92.86%, #c8a2c8 100%);
  background-image: linear-gradient(135deg in oklab, #f0e68c 0%, #c8a2c8 100%);
}
tailwind v4
bg-linear-to-br/oklab from-[#f0e68c] to-[#c8a2c8]
svg
<svg xmlns="http://www.w3.org/2000/svg" width="1440" height="600" viewBox="0 0 1440 600"><defs><linearGradient id="bs-gradient" gradientUnits="userSpaceOnUse" x1="210" y1="-210" x2="1230" y2="810"><stop offset="0%" stop-color="#f0e68c"/><stop offset="7.14%" stop-color="#ede192"/><stop offset="14.29%" stop-color="#eadd98"/><stop offset="21.43%" stop-color="#e7d89d"/><stop offset="28.57%" stop-color="#e4d3a2"/><stop offset="35.71%" stop-color="#e1cea6"/><stop offset="42.86%" stop-color="#decaab"/><stop offset="50%" stop-color="#dbc5af"/><stop offset="57.14%" stop-color="#d9c0b3"/><stop offset="64.29%" stop-color="#d6bbb7"/><stop offset="71.43%" stop-color="#d3b6bb"/><stop offset="78.57%" stop-color="#d0b1be"/><stop offset="85.71%" stop-color="#cdacc2"/><stop offset="92.86%" stop-color="#cba7c5"/><stop offset="100%" stop-color="#c8a2c8"/></linearGradient></defs><rect width="1440" height="600" fill="url(#bs-gradient)"/></svg>
dtcg
{
  "khaki-to-lilac": {
    "$type": "gradient",
    "$value": [
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.941,
            0.902,
            0.549
          ],
          "hex": "#f0e68c"
        },
        "position": 0
      },
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.784,
            0.635,
            0.784
          ],
          "hex": "#c8a2c8"
        },
        "position": 1
      }
    ],
    "$extensions": {
      "com.brandsweets": {
        "kind": "linear",
        "css": "linear-gradient(135deg in oklab, #f0e68c 0%, #c8a2c8 100%)",
        "interpolation": "oklab",
        "angle": 135,
        "name": "khaki-to-lilac",
        "contrast": {
          "white": {
            "ratio": 1.28,
            "at": 0.0076,
            "passesAA": false,
            "passesAALarge": false
          },
          "black": {
            "ratio": 9.458,
            "at": 1,
            "passesAA": true,
            "passesAALarge": true
          },
          "suggestedInk": "#000000"
        }
      }
    },
    "$description": "Khaki to Lilac, interpolated in oklab."
  }
}

More from Khaki

mcpConnect your agent to the gradient engine
live endpoint

Point any MCP client at the shared gradients endpoint and your agent gets the same engine as this page — make_gradient returns CSS with the interpolation space, Tailwind v4, SVG, a PNG URL, a DTCG token and the contrast report in one call; brand_gradients derives the whole contact sheet from a brand or a palette. Read-only, no key. Every gradient is a /gradients/new/… link: open it, refine, paste it back.

endpointhttps://mcp.brandsweets.com/gradients/mcp
claude mcp add --transport http brandsweets-gradients https://mcp.brandsweets.com/gradients/mcp
try this prompt

make a khaki to lilac hero gradient in oklch that passes AA for white text, with grain if it bands

Want the agent to remember your picks and write them into a living brand? Create a free BrandSweets workspace.

Machine-readable: gradients.md