Named gradient · WebGradients

Sleepless Night

Sleepless Night is a purple gradient from WebGradients (MIT) — #5271c4 → #b19fff → #eca1fe at 135°. Shown here interpolated in OKLab, next to the original sRGB, with the worst-case contrast for white and black text and every export.

Aa — the quick brown fox
black text · worst 4.52:1 · AA
white 1.89 failsblack 4.52 AAbanding high

Same stops, three spaces

The source renders this in sRGB. The number is how much chroma survives at the dullest point along the line — the difference between the first bar and the others is the grey that OKLab removes.

sRGB93%
OKLab93%
OKLCH94%

Report

  • white ink: worst 1.89:1 at 100% (fails AA); black ink: worst 4.52:1 at 0% (AA) → use black text.
  • Banding high: ~13px bands at 1440px — add grain 27 (≈2% soft-light noise) or shorten the ramp.

Export

css
.gradient {
  background-image: linear-gradient(135deg, #5271c4 0%, #5974c8 3.43%, #6078cc 6.86%, #677bd0 10.29%, #6e7ed5 13.71%, #7581d9 17.14%, #7b85dd 20.57%, #8288e1 24%, #898be5 27.43%, #8f8fea 30.86%, #9692ee 34.29%, #9d95f2 37.71%, #a498f6 41.14%, #aa9cfb 44.57%, #b19fff 48%, #b59fff 51.71%, #baa0ff 55.43%, #bea0ff 59.14%, #c2a0ff 62.86%, #c7a0ff 66.57%, #cba0ff 70.29%, #cfa1ff 74%, #d3a1ff 77.71%, #d7a1fe 81.43%, #dca1fe 85.14%, #e0a1fe 88.86%, #e4a1fe 92.57%, #e8a1fe 96.29%, #eca1fe 100%);
  background-image: linear-gradient(135deg in oklab, #5271c4 0%, #b19fff 48%, #eca1fe 100%);
}
tailwind v4
bg-linear-to-br/oklab from-[#5271c4] via-[#b19fff] via-48% to-[#eca1fe]
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="#5271c4"/><stop offset="3.43%" stop-color="#5974c8"/><stop offset="6.86%" stop-color="#6078cc"/><stop offset="10.29%" stop-color="#677bd0"/><stop offset="13.71%" stop-color="#6e7ed5"/><stop offset="17.14%" stop-color="#7581d9"/><stop offset="20.57%" stop-color="#7b85dd"/><stop offset="24%" stop-color="#8288e1"/><stop offset="27.43%" stop-color="#898be5"/><stop offset="30.86%" stop-color="#8f8fea"/><stop offset="34.29%" stop-color="#9692ee"/><stop offset="37.71%" stop-color="#9d95f2"/><stop offset="41.14%" stop-color="#a498f6"/><stop offset="44.57%" stop-color="#aa9cfb"/><stop offset="48%" stop-color="#b19fff"/><stop offset="51.71%" stop-color="#b59fff"/><stop offset="55.43%" stop-color="#baa0ff"/><stop offset="59.14%" stop-color="#bea0ff"/><stop offset="62.86%" stop-color="#c2a0ff"/><stop offset="66.57%" stop-color="#c7a0ff"/><stop offset="70.29%" stop-color="#cba0ff"/><stop offset="74%" stop-color="#cfa1ff"/><stop offset="77.71%" stop-color="#d3a1ff"/><stop offset="81.43%" stop-color="#d7a1fe"/><stop offset="85.14%" stop-color="#dca1fe"/><stop offset="88.86%" stop-color="#e0a1fe"/><stop offset="92.57%" stop-color="#e4a1fe"/><stop offset="96.29%" stop-color="#e8a1fe"/><stop offset="100%" stop-color="#eca1fe"/></linearGradient></defs><rect width="1440" height="600" fill="url(#bs-gradient)"/></svg>
dtcg
{
  "sleepless-night": {
    "$type": "gradient",
    "$value": [
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.322,
            0.443,
            0.769
          ],
          "hex": "#5271c4"
        },
        "position": 0
      },
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.694,
            0.624,
            1
          ],
          "hex": "#b19fff"
        },
        "position": 0.48
      },
      {
        "color": {
          "colorSpace": "srgb",
          "components": [
            0.925,
            0.631,
            0.996
          ],
          "hex": "#eca1fe"
        },
        "position": 1
      }
    ],
    "$extensions": {
      "com.brandsweets": {
        "kind": "linear",
        "css": "linear-gradient(135deg in oklab, #5271c4 0%, #b19fff 48%, #eca1fe 100%)",
        "interpolation": "oklab",
        "angle": 135,
        "name": "Sleepless Night",
        "contrast": {
          "white": {
            "ratio": 1.893,
            "at": 1,
            "passesAA": false,
            "passesAALarge": false
          },
          "black": {
            "ratio": 4.518,
            "at": 0,
            "passesAA": true,
            "passesAALarge": true
          },
          "suggestedInk": "#000000"
        }
      }
    },
    "$description": "Sleepless Night (WebGradients, MIT), rendered in OKLab."
  }
}

Tagged

More purple gradients

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

take the Sleepless Night gradient (#5271c4, #b19fff, #eca1fe), re-interpolate it in oklch, and tell me the worst-case contrast for white text

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

Machine-readable: gradients.md · From WebGradients (MIT) — licences