Colour to colour

Denim to Midnight Blue gradient

Denim (#1560bd) into Midnight Blue (#191970) — 16° 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.

Denim → Midnight Blue
white text · worst 6.11:1 · AA
white 6.11 AAblack 1.41 failsbanding medium

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 6.11 AAblack 1.41 failsbanding medium
css
linear-gradient(135deg in oklab, #1560bd 0%, #191970 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 6.11 AAblack 1.41 failsbanding medium
css
linear-gradient(135deg in oklch shorter hue, #1560bd 0%, #191970 100%)

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

sRGB94%
OKLab94%
OKLCH94%

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 6.11 AAblack 1.41 failsbanding medium
css
linear-gradient(135deg in oklab, #1560bd 0%, #155fbc 8.28%, #165cb9 16.03%, #1758b4 23.35%, #1852ad 30.32%, #194ba6 37.03%, #1a449e 43.56%, #1b3d96 50%, #1b358e 56.44%, #1b2e86 62.97%, #1a287f 69.68%, #1a2279 76.65%, #191d74 83.97%, #191a71 91.72%, #191970 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 6.99 AAblack 1.97 failsbanding high
css
background-color: #1b3d96;
background-image: radial-gradient(circle farthest-corner at 2.58% 9.63%, rgba(21, 96, 189, 0.759) 0%, rgba(21, 96, 189, 0) 52.02%), radial-gradient(circle farthest-corner at 9.68% 74.91%, rgba(25, 25, 112, 0.804) 0%, rgba(25, 25, 112, 0) 55.38%);
background-image: radial-gradient(circle farthest-corner at 2.58% 9.63%, oklch(from #1560bd l c h / 0.759) 0%, rgb(from #1560bd r g b / 0) 52.02%), radial-gradient(circle farthest-corner at 9.68% 74.91%, oklch(from #191970 l c h / 0.804) 0%, rgb(from #191970 r g b / 0) 55.38%);

Report

  • white ink: worst 6.11:1 at 0% (AA); black ink: worst 1.41:1 at 100% (fails AA) → use white text.
  • Banding medium: ~19px bands at 1440px — add grain 38 (≈3% soft-light noise) or shorten the ramp.

Export

css
.gradient {
  background-image: linear-gradient(135deg, #1560bd 0%, #165bb7 7.14%, #1856b2 14.29%, #1951ac 21.43%, #194ca6 28.57%, #1a47a1 35.71%, #1a429b 42.86%, #1b3d96 50%, #1b3890 57.14%, #1b338b 64.29%, #1b2e85 71.43%, #1a2980 78.57%, #1a247b 85.71%, #1a1e75 92.86%, #191970 100%);
  background-image: linear-gradient(135deg in oklab, #1560bd 0%, #191970 100%);
}
tailwind v4
bg-linear-to-br/oklab from-[#1560bd] to-[#191970]
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="#1560bd"/><stop offset="7.14%" stop-color="#165bb7"/><stop offset="14.29%" stop-color="#1856b2"/><stop offset="21.43%" stop-color="#1951ac"/><stop offset="28.57%" stop-color="#194ca6"/><stop offset="35.71%" stop-color="#1a47a1"/><stop offset="42.86%" stop-color="#1a429b"/><stop offset="50%" stop-color="#1b3d96"/><stop offset="57.14%" stop-color="#1b3890"/><stop offset="64.29%" stop-color="#1b338b"/><stop offset="71.43%" stop-color="#1b2e85"/><stop offset="78.57%" stop-color="#1a2980"/><stop offset="85.71%" stop-color="#1a247b"/><stop offset="92.86%" stop-color="#1a1e75"/><stop offset="100%" stop-color="#191970"/></linearGradient></defs><rect width="1440" height="600" fill="url(#bs-gradient)"/></svg>
dtcg
{
  "denim-to-midnightblue": {
    "$type": "gradient",
    "$value": [
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.082,
            0.376,
            0.741
          ],
          "hex": "#1560bd"
        },
        "position": 0
      },
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.098,
            0.098,
            0.439
          ],
          "hex": "#191970"
        },
        "position": 1
      }
    ],
    "$extensions": {
      "com.brandsweets": {
        "kind": "linear",
        "css": "linear-gradient(135deg in oklab, #1560bd 0%, #191970 100%)",
        "interpolation": "oklab",
        "angle": 135,
        "name": "denim-to-midnightblue",
        "contrast": {
          "white": {
            "ratio": 6.105,
            "at": 0,
            "passesAA": true,
            "passesAALarge": true
          },
          "black": {
            "ratio": 1.414,
            "at": 1,
            "passesAA": false,
            "passesAALarge": false
          },
          "suggestedInk": "#ffffff"
        }
      }
    },
    "$description": "Denim to Midnight Blue, interpolated in oklab."
  }
}

More from Denim

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 denim to midnight blue 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