# Bun gradient

Gradients derived from Bun's published colour tokens (nominative use; no brand assets). Deterministic: the same values are served as `--brand-gradient*` in the brand's brand.css.

- Page: https://brandsweets.com/gradients/brands/bun-sh
- Brand colors: https://brandsweets.com/colors/brands/bun-sh · Brand page: https://brandsweets.com/b/bun-sh
- Palette: primary #4d7c1b, secondary #c41a68, accents #4d7c1b
- Source: https://bun.sh (extracted 2026-09-02)

## Brand gradient

- CSS: `linear-gradient(135deg in oklab, #4d7c1b 0%, #c41a68 100%)`
- Tailwind: `bg-linear-to-br/oklab from-[#4d7c1b] to-[#c41a68]`
- Contrast (worst point): white 4.96:1 AA · black 3.69:1 AA-large · banding high
- Maker: https://brandsweets.com/gradients/new/v1.4d7c1b-c41a68?a=135

## Hero background

Chroma ×0.35 so it can carry text; ink white (inkFor at the midpoint). Passes AA for that ink at the worst point (5.08:1) without adjusting L.

- CSS: `linear-gradient(135deg in oklab, #627356 0%, #915d6c 100%)`
- Tailwind: `bg-linear-to-br/oklab from-[#627356] to-[#915d6c]`
- Contrast (worst point): white 5.08:1 AA · black 3.97:1 AA-large · banding high · ink #ffffff
- Maker: https://brandsweets.com/gradients/new/v1.627356-915d6c?a=135

## Button / CTA

ΔL 0.08 top→bottom in the primary's hue (a lit surface, not a rainbow); hover L +0.03, active L −0.03. L shifted −0.05 so white ink passes AA on the surface and both states (worst 4.58:1).

- CSS: `linear-gradient(180deg in oklch shorter hue, #4a7917 0%, #346100 100%)`
- Tailwind: `bg-linear-to-b/oklch from-[#4a7917] to-[#346100]`
- Contrast (worst point): white 5.20:1 AA · black 2.86:1 fail · banding high · ink #ffffff
- Maker: https://brandsweets.com/gradients/new/v1.4a7917-346100?a=180&in=oklch&hue=shorter
- Hover: `linear-gradient(180deg in oklch shorter hue, #538223 0%, #3c6a00 100%)`
- Active: `linear-gradient(180deg in oklch shorter hue, #427006 0%, #2c5900 100%)`

## Tonal ramp

- CSS: `linear-gradient(135deg in oklch shorter hue, #82b457 0%, #4d7c1b 50%, #1f4700 100%)`
- Tailwind: `bg-linear-to-br/oklch from-[#82b457] via-[#4d7c1b] to-[#1f4700]`
- Contrast (worst point): white 2.44:1 fail · black 1.96:1 fail · banding high
- Maker: https://brandsweets.com/gradients/new/v1.82b457-4d7c1b-1f4700?a=135&in=oklch&hue=shorter

## Analogous

Partner hue from the analogous rule at the source colour's lightness.

- CSS: `linear-gradient(135deg in oklab, #4d7c1b 0%, #786e1b 100%)`
- Tailwind: `bg-linear-to-br/oklab from-[#4d7c1b] to-[#786e1b]`
- Contrast (worst point): white 4.96:1 AA · black 4.03:1 AA-large · banding high
- Maker: https://brandsweets.com/gradients/new/v1.4d7c1b-786e1b?a=135

## Complementary

Partner hue from the complementary rule at the source colour's lightness. ΔH 180° > 140° — interpolating in oklch (shorter hue) keeps the midpoint saturated.

- CSS: `linear-gradient(135deg in oklch shorter hue, #4d7c1b 0%, #9a24cd 100%)`
- Tailwind: `bg-linear-to-br/oklch from-[#4d7c1b] to-[#9a24cd]`
- Contrast (worst point): white 4.69:1 AA · black 3.51:1 AA-large · banding high
- Maker: https://brandsweets.com/gradients/new/v1.4d7c1b-9a24cd?a=135&in=oklch&hue=shorter

## Triadic

Partner hue from the triadic rule at the source colour's lightness.

- CSS: `linear-gradient(135deg in oklab, #4d7c1b 0%, #1c6ebe 100%)`
- Tailwind: `bg-linear-to-br/oklab from-[#4d7c1b] to-[#1c6ebe]`
- Contrast (worst point): white 4.96:1 AA · black 4.01:1 AA-large · banding high
- Maker: https://brandsweets.com/gradients/new/v1.4d7c1b-1c6ebe?a=135

## CSS custom properties (brand.css)

```css
:root {
  /* Brand gradient (derived) */
  /* worst-case contrast: white 4.96:1 AA, black 3.69:1 AA-large */
  --brand-gradient: linear-gradient(135deg in oklab, #4d7c1b 0%, #c41a68 100%);
  /* hero — worst-case contrast: white 5.08:1 AA, black 3.97:1 AA-large; ink passes AA at the worst point */
  --brand-gradient-hero: linear-gradient(135deg in oklab, #627356 0%, #915d6c 100%);
  --brand-gradient-hero-ink: #ffffff;
  /* button — worst-case contrast: white 5.20:1 AA, black 2.86:1 */
  --brand-gradient-button: linear-gradient(180deg in oklch shorter hue, #4a7917 0%, #346100 100%);
  --brand-gradient-button-hover: linear-gradient(180deg in oklch shorter hue, #538223 0%, #3c6a00 100%);
  --brand-gradient-button-active: linear-gradient(180deg in oklch shorter hue, #427006 0%, #2c5900 100%);
  --brand-gradient-button-ink: #ffffff;
}
```

## Gradient maker

Every maker URL is the gradient's state: `/gradients/new/v1.<hex>-<hex>[_pos]?a=135&in=oklch&hue=shorter&e=soft&g=8`. Hand one to a human, let them refine, and read the link they return.

## Connect an agent

Point any MCP client at the BrandSweets gradients endpoint for the same engine and corpus:

- Endpoint: https://mcp.brandsweets.com/gradients/mcp
- Tools: `make_gradient` (2–5 colours → CSS with the interpolation space, Tailwind v4, SVG, PNG URL, DTCG token + the contrast/banding/gamut report), `brand_gradients` (brand slug or palette → brand gradient, hero, button, variants).
- Resource: `gradients://corpus` — the whole bundled corpus as JSON.
