Skip to content

Leonxlnx/taste-skill / skills/taste-skill

design-taste-frontend

Verified

tasteskill 2.5.1, the anti-slop frontend skill. Builds professional company websites at the level of figma.com and x.ai: plain copy in a voice of its own, one system, one section per screen, equal edges, real photographs and real product UI (licensed stand-in photographs when the client has none; a product render only when the brief asks for 3D), a hero entrance and one or two dealt moments on every page, shader effects and scenes only on tech, gaming and software pages, quiet micro-interactions, and a checker and finish gate that enforce it in a real browser. Use this whenever you build, design, redesign, restyle, polish or review a landing page, company, product, shop, cafe, hotel, studio, SaaS, AI, developer-tool or game site, as static HTML/CSS or inside an existing React, Next.js, Vue, Svelte, Astro or Tailwind project, or when the user says a page looks generic, templated or "AI-made".

FileKindSize
SKILL.mdskill md30.2 KB
assets/backgrounds/backgrounds.cssother41.5 KB
assets/backgrounds/backgrounds.jsscript8.9 KB
assets/backgrounds/check.htmlother4.8 KB
assets/backgrounds/check.mjsscript14.2 KB
assets/backgrounds/demo.htmlother43.3 KB
assets/backgrounds/index.jsonconfig19.6 KB
assets/backgrounds/pick.mjsscript14.0 KB
assets/components/_lab.htmlother6.4 KB
assets/components/base.cssother7.6 KB
assets/components/fx-avatar/component.cssother3.3 KB
assets/components/fx-avatar/component.htmlother1.2 KB
assets/components/fx-avatar/component.jsscript2.7 KB
assets/components/fx-avatar/meta.jsonconfig870 B
assets/components/fx-band/component.cssother1.4 KB
assets/components/fx-band/component.htmlother482 B
assets/components/fx-band/component.jsscript2.7 KB
assets/components/fx-band/meta.jsonconfig1.1 KB
assets/components/fx-bars/component.cssother3.4 KB
assets/components/fx-bars/component.htmlother2.3 KB
assets/components/fx-bars/component.jsscript2.2 KB
assets/components/fx-bars/meta.jsonconfig1.2 KB
assets/components/fx-button/component.cssother1.6 KB
assets/components/fx-button/component.htmlother798 B
assets/components/fx-button/component.jsscript3.0 KB
assets/components/fx-button/meta.jsonconfig1.1 KB
assets/components/fx-chart/component.cssother3.4 KB
assets/components/fx-chart/component.htmlother1.2 KB
assets/components/fx-chart/component.jsscript5.3 KB
assets/components/fx-chart/meta.jsonconfig1.3 KB
assets/components/fx-dither-object/component.cssother452 B
assets/components/fx-dither-object/component.htmlother177 B
assets/components/fx-dither-object/component.jsscript24.1 KB
assets/components/fx-dither-object/meta.jsonconfig2.7 KB
assets/components/fx-feature-card/component.cssother10.7 KB
assets/components/fx-feature-card/component.htmlother8.9 KB
assets/components/fx-feature-card/component.jsscript12.1 KB
assets/components/fx-feature-card/meta.jsonconfig3.0 KB
assets/components/fx-globe/component.cssother2.2 KB
assets/components/fx-globe/component.htmlother1.6 KB
assets/components/fx-globe/component.jsscript1.3 KB
assets/components/fx-globe/meta.jsonconfig819 B
assets/components/fx-headline/component.cssother1.6 KB
assets/components/fx-headline/component.htmlother833 B
assets/components/fx-headline/component.jsscript742 B
assets/components/fx-headline/meta.jsonconfig964 B
assets/components/fx-icon-tiles/component.cssother1.7 KB
assets/components/fx-icon-tiles/component.htmlother2.1 KB
assets/components/fx-icon-tiles/component.jsscript1.4 KB
assets/components/fx-icon-tiles/meta.jsonconfig922 B
assets/components/fx-logos/component.cssother2.0 KB
assets/components/fx-logos/component.htmlother12.4 KB
assets/components/fx-logos/component.jsscript1.2 KB
assets/components/fx-logos/meta.jsonconfig1.0 KB
assets/components/fx-map/bake.mjsscript25.2 KB
assets/components/fx-map/component.cssother10.6 KB
assets/components/fx-map/component.htmlother1.2 KB
assets/components/fx-map/component.jsscript14.4 KB
assets/components/fx-map/meta.jsonconfig2.6 KB
assets/components/fx-map/sample-map.jsonconfig55.7 KB
assets/components/fx-photo/component.cssother2.0 KB
assets/components/fx-photo/component.htmlother553 B
assets/components/fx-photo/component.jsscript1.9 KB
assets/components/fx-photo/meeting-room.jpgbinary198.7 KB
assets/components/fx-photo/meta.jsonconfig1.8 KB
assets/components/fx-pricing/component.cssother3.8 KB
assets/components/fx-pricing/component.htmlother1.8 KB
assets/components/fx-pricing/component.jsscript1.5 KB
assets/components/fx-pricing/meta.jsonconfig971 B
assets/components/fx-progress/component.cssother2.9 KB
assets/components/fx-progress/component.htmlother2.0 KB
assets/components/fx-progress/component.jsscript4.3 KB
assets/components/fx-progress/meta.jsonconfig1.3 KB
assets/components/fx-prompt/component.cssother3.1 KB
assets/components/fx-prompt/component.htmlother1.3 KB
assets/components/fx-prompt/component.jsscript1.1 KB
assets/components/fx-prompt/meta.jsonconfig782 B
assets/components/fx-search/component.cssother2.6 KB
assets/components/fx-search/component.htmlother1.4 KB
assets/components/fx-search/component.jsscript4.9 KB
assets/components/fx-search/meta.jsonconfig953 B
assets/components/fx-spotlight/component.cssother1.8 KB
assets/components/fx-spotlight/component.htmlother1.6 KB
assets/components/fx-spotlight/component.jsscript4.0 KB
assets/components/fx-spotlight/meta.jsonconfig1.1 KB
assets/components/fx-stat/component.cssother1.6 KB
assets/components/fx-stat/component.htmlother694 B
assets/components/fx-stat/component.jsscript1.2 KB
assets/components/fx-stat/meta.jsonconfig1.1 KB
assets/components/fx-tabs/component.cssother5.0 KB
assets/components/fx-tabs/component.htmlother2.9 KB
assets/components/fx-tabs/component.jsscript3.1 KB
assets/components/fx-tabs/meta.jsonconfig1.2 KB
assets/components/index.htmlother18.6 KB
assets/components/shared.jsscript25.9 KB
assets/diagrams/demo.htmlother11.4 KB
assets/diagrams/diagram.cssother25.5 KB
assets/diagrams/diagram.jsscript89.2 KB
assets/diagrams/lab.htmlother11.2 KB
assets/diagrams/mount.jsscript609 B
assets/diagrams/presets.jsonconfig27.8 KB
assets/effects/README.mdmarkdown9.8 KB
assets/effects/ascii-shade/effect.jsscript18.3 KB
assets/effects/ascii-shade/meta.jsonconfig372 B
assets/effects/aurora-curtains/effect.jsscript9.2 KB
assets/effects/aurora-curtains/meta.jsonconfig361 B
assets/effects/bayer-dither/effect.jsscript5.9 KB
assets/effects/bayer-dither/meta.jsonconfig311 B
assets/effects/caustics/effect.jsscript7.3 KB
assets/effects/caustics/meta.jsonconfig357 B
assets/effects/contour-lines/effect.jsscript8.2 KB
assets/effects/contour-lines/meta.jsonconfig358 B
assets/effects/dot-terrain/effect.jsscript9.2 KB
assets/effects/dot-terrain/meta.jsonconfig332 B
assets/effects/dotted-globe/effect.jsscript52.9 KB
assets/effects/dotted-globe/meta.jsonconfig546 B
assets/effects/duotone-grade/effect.jsscript33.7 KB
assets/effects/duotone-grade/meta.jsonconfig395 B
assets/effects/edge-glow/effect.jsscript10.6 KB
assets/effects/edge-glow/meta.jsonconfig427 B
assets/effects/film-light-leak/effect.jsscript12.2 KB
assets/effects/film-light-leak/meta.jsonconfig343 B
assets/effects/fluted-glass/effect.jsscript9.7 KB
assets/effects/fluted-glass/meta.jsonconfig305 B
assets/effects/fx.jsscript40.5 KB
assets/effects/gallery.htmlother37.4 KB
assets/effects/god-rays/effect.jsscript9.1 KB
assets/effects/god-rays/meta.jsonconfig318 B
assets/effects/gradient-mesh/effect.jsscript11.0 KB
assets/effects/gradient-mesh/meta.jsonconfig334 B
assets/effects/grain-gradient/effect.jsscript8.1 KB
assets/effects/grain-gradient/meta.jsonconfig311 B
assets/effects/grid-pulse/effect.jsscript18.6 KB
assets/effects/grid-pulse/meta.jsonconfig343 B
assets/effects/halftone-screen/effect.jsscript12.8 KB
assets/effects/halftone-screen/meta.jsonconfig342 B
assets/effects/index.jsonconfig36.7 KB
assets/effects/lab.htmlother31.0 KB
assets/effects/line-engraving/effect.jsscript12.4 KB
assets/effects/line-engraving/meta.jsonconfig343 B
assets/effects/orb-sphere/effect.jsscript14.2 KB
assets/effects/orb-sphere/meta.jsonconfig366 B
assets/effects/painterly-landscape/effect.jsscript12.8 KB
assets/effects/painterly-landscape/meta.jsonconfig364 B
assets/effects/pick.jsscript10.1 KB
assets/effects/prism-dispersion/effect.jsscript9.6 KB
assets/effects/prism-dispersion/meta.jsonconfig331 B
assets/effects/ridgeline/effect.jsscript19.2 KB
assets/effects/ridgeline/meta.jsonconfig460 B
assets/effects/ruled-grounds/effect.jsscript11.3 KB
assets/effects/ruled-grounds/meta.jsonconfig357 B
assets/effects/silk-folds/effect.jsscript10.4 KB
assets/effects/silk-folds/meta.jsonconfig348 B
assets/effects/soft-light-bars/effect.jsscript21.1 KB
assets/effects/soft-light-bars/meta.jsonconfig391 B
assets/effects/spotlight-cone/effect.jsscript7.3 KB
assets/effects/spotlight-cone/meta.jsonconfig349 B
assets/icons/demo.htmlother475.1 KB
assets/icons/demo/adyen.svgother2.4 KB
assets/icons/demo/after-effects.svgother5.2 KB
assets/icons/demo/ai.svgother795 B
assets/icons/demo/airbnb.svgother5.2 KB
assets/icons/demo/airbyte.svgother3.0 KB
assets/icons/demo/airflow.svgother3.4 KB
assets/icons/demo/airtable.svgother1.8 KB
assets/icons/demo/akamai.svgother5.5 KB
assets/icons/demo/algolia.svgother11.5 KB
assets/icons/demo/alpinejs.svgother343 B
assets/icons/demo/amd.svgother1.5 KB
assets/icons/demo/amex.svgother8.4 KB
assets/icons/demo/amplitude.svgother3.3 KB
assets/icons/demo/android.svgother4.7 KB
assets/icons/demo/angular.svgother1.8 KB
assets/icons/demo/ansible.svgother5.4 KB
assets/icons/demo/anthropic.svgother1.2 KB
assets/icons/demo/app-store.svgother2.9 KB
assets/icons/demo/apple-pay.svgother3.1 KB
assets/icons/demo/apple.svgother1.2 KB
assets/icons/demo/arc.svgother4.6 KB
assets/icons/demo/archlinux.svgother1.0 KB
assets/icons/demo/arduino.svgother6.7 KB
assets/icons/demo/argo.svgother22.7 KB
assets/icons/demo/arm.svgother2.5 KB
assets/icons/demo/asana.svgother1004 B
assets/icons/demo/astro.svgother3.1 KB
assets/icons/demo/audio.svgother516 B
assets/icons/demo/auth0.svgother759 B
assets/icons/demo/aws.svgother7.9 KB
assets/icons/demo/azure.svgother3.2 KB
assets/icons/demo/babel.svgother68.6 KB
assets/icons/demo/basecamp.svgother3.4 KB
assets/icons/demo/baseten.svgother1.3 KB
assets/icons/demo/bash.svgother4.2 KB
assets/icons/demo/battle-net.svgother1.1 KB
assets/icons/demo/behance.svgother12.4 KB
assets/icons/demo/bitbucket.svgother1.5 KB
assets/icons/demo/bitcoin.svgother2.3 KB
assets/icons/demo/blender.svgother3.7 KB
assets/icons/demo/bluesky.svgother1.0 KB
assets/icons/demo/bootstrap.svgother2.0 KB

assets/effects/film-light-leak/effect.js

View on GitHub
// film-light-leak: light bleeding in from one edge or corner of a dark or coloured frame, the way a film
// is fogged when the camera back leaks. From the edge where the light struck (an optional burn hugs it)
// the exposure falls off through a deep fringe (warm when the palette has a warm colour) and the
// glow into the ground, with a near-white core, fine moving film grain and a slight vignette. It
// breathes slowly. The seed picks the edge away from the text unless `edge` names one.
import { shader, color, grainCSS, rng } from '../fx.js';

const params = {
  edge:      { default: -1,   min: -1,   max: 4,    step: 1 },    // -1 the seed picks; 0 right, 1 left, 2 top, 3 bottom, 4 corner
  intensity: { default: 0.8,  min: 0,    max: 1.5,  step: 0.01 }, // exposure of the leak
  spread:    { default: 0.45, min: 0.1,  max: 1,    step: 0.01 }, // how far it reaches into the frame
  halation:  { default: 0.3,  min: 0,    max: 1,    step: 0.01 }, // the wider, deeper fringe around it
  burn:      { default: 0,    min: 0,    max: 1,    step: 0.01 }, // a burn along the frame edge; 0 by default (a hard strip reads as a glitch)
  grain:     { default: 0.04, min: 0,    max: 0.1,  step: 0.005 },// film grain, 0.04 is 4%
  vignette:  { default: 0.25, min: 0,    max: 1,    step: 0.01 },
  breathe:   { default: 12,   min: 6,    max: 20,   step: 0.5 },  // seconds per slow breath
  warp:      { default: 0.65, min: 0,    max: 1,    step: 0.01 }, // how organic the leak's edge is
  calm:      { default: 0.5,  min: 0,    max: 1,    step: 0.01 }, // holds the light back from the text area
  calmX:     { default: 0.25, min: 0,    max: 1,    step: 0.01 },
  calmY:     { default: 0.6,  min: 0,    max: 1,    step: 0.01 },
};

const frag = /* glsl */ `
void main() {
  vec2 uv = fx_uv();
  vec2 p = fx_p();
  float t = u_time;

  // a slow organic bend, so the edge of the light is never a clean ellipse
  float wt = t * 0.03 + u_seed * 0.011;
  vec2 w = vec2(fx_fbm(p * 0.95 + vec2(wt, 2.3)), fx_fbm(p * 0.95 + vec2(5.1, -wt * 0.8)));
  vec2 q = p + w * 0.34 * u_warp;

  // distance from the source on the edge: stretched along the edge, measured into the frame
  float sp = 0.12 + 0.75 * u_spread;
  vec2 rel = q - u_src;
  float along = dot(rel, u_axis);
  float into = max(dot(rel, u_in), 0.0);
  float d = length(vec2(along * u_stretch, into)) / sp;
  // a second, smaller bloom further along the edge, so the light is never one clean ellipse
  vec2 rel2 = q - u_src - u_axis * (u_lobe + 0.04 * sin(t * 0.07));
  float d2 = length(vec2(dot(rel2, u_axis) * 1.2, max(dot(rel2, u_in), 0.0))) / (sp * 0.5);

  // slow breaths, incommensurate sines so it never loops visibly
  float br = 1.0 + 0.13 * sin(FX_TAU * t / u_breathe) + 0.05 * sin(FX_TAU * t / (u_breathe * 1.618) + 1.3);
  float br2 = 1.0 + 0.18 * sin(FX_TAU * t / (u_breathe * 1.31) + 2.1);

  float m = fx_calm(uv, vec2(u_calmX, u_calmY), 0.3 + 0.55 * u_calm) * u_calm;
  // a broad bloom, a smaller one beside it, and a hot band hugging the edge where the film was struck
  float band = exp(-into / (0.02 + 0.04 * u_spread)) * exp(-along * along * 6.0);
  float E = u_intensity * u_gain * (6.0 * exp(-d * 2.7) * br + 3.0 * exp(-d2 * 2.5) * br2 + 3.5 * band * br) * (1.0 - 0.9 * m);
  // light bleeds into the frame in soft streaks, long across the frame and narrow along the edge
  float rays = fx_noise(vec2(along * 7.0 + u_seed * 0.01, into * 0.7 - t * 0.01));
  E *= 1.0 + 0.8 * rays * smoothstep(0.0, 0.2, into);
  float H = u_halation * (exp(-d * 1.05) + 0.4 * exp(-d2 * 1.1)) * br * (1.0 - 0.8 * m);

  // grain lives in the exposure, before the curve, so it is strongest in the mid tones like film
  float frame = floor(t * 24.0);
  float g = fx_grain(gl_FragCoord.xy, frame);
  E = max(E * (1.0 + g * u_grain * 3.0), 0.0);
  float e = E / (1.0 + E);                                   // filmic shoulder: a soft, blown-out core

  // the ground darkens a little toward the corners (lens vignette); the leak exposes on top of it
  vec2 vc = (uv - 0.5) * vec2(u_res.x / u_res.y, 1.0) / (0.5 * max(u_res.x / u_res.y, 1.0));
  vec3 col = u_ground;                                        // OKLab
  col.x *= 1.0 - u_vignette * u_vig * 0.6 * smoothstep(0.35, 1.25, length(vc));
  col = mix(col, u_halo, clamp(H, 0.0, 1.0) * 0.75);
  col = mix(col, u_deep, smoothstep(u_ramp.x, u_ramp.y, e));
  col = mix(col, u_glow, smoothstep(u_ramp.y - 0.12, u_ramp.z, e));
  col = mix(col, u_hot, smoothstep(u_ramp.z - 0.1, u_ramp.w, e));

  // the burn: an uneven band along the frame edge near the source with a crisp inner boundary, its
  // own colour at the boundary and blown out against the edge
  if (u_burn > 0.0) {
    // depth into the frame from the struck edge (from both edges at a corner)
    vec2 hf2 = vec2(0.5 * u_res.x / u_res.y, 0.5);
    vec2 de = hf2 - abs(p);
    float dE = u_corner > 0.5 ? min(de.x, de.y) : dot(p - u_src, u_in);
    vec2 r0 = p - u_src;
    float near = exp(-dot(r0, r0) / (sp * sp * 1.1)) * br;
    float n = fx_noise(vec2((p.x + p.y) * 2.2 + u_seed * 0.013, t * 0.015)) + 0.25 * fx_noise(vec2((p.x - p.y) * 6.0, 3.0 + u_seed * 0.007));
    float bw = max(0.0, (0.05 + 0.13 * (n + 0.3)) * near * u_burn) * (1.0 - m);
    float px = 2.4 / u_res.y;
    // the band fades out where it thins, so it never stops in a hard end partway along the edge
    float b = (1.0 - smoothstep(bw - px, bw + px, dE)) * smoothstep(px, px * 8.0, bw);
    // blown out against the edge, a saturated fringe just inside the crisp boundary
    float fr = smoothstep(bw * 0.4, bw * 0.95, dE);
    col = mix(col, mix(u_hot, u_burnC, fr), b * 0.95);
  }

  // fine monochrome grain on top, re-seeded every frame, softer in the blown-out core
  col.x += g * u_grain * u_grainAmp * (1.0 - 0.6 * smoothstep(0.85, 1.0, col.x));

  fxColor = vec4(fx_dither(fx_rgb(col)), 1.0);
}
`;

// reds, oranges, golds and yellows (OKLCH hue), with some colour in them
const isWarm = c => { const [, C, h] = color.lch(c); return C > 0.05 && (h < 112 || h > 345); };
// keeps pale tints out of the lavender band
const guard = ([L, C, h]) => (h > 262 && h < 322 ? [L, Math.min(C, 0.018), h] : [L, C, h]);

// the ramp: ground, a wide halo, a deep fringe, the glow, a near-white core, and the burn colour; all
// from the palette (a warm palette colour leads the fringe and the burn; a warm glow shifts toward red
// in the fringe and toward yellow in the core, as a real leak does)
function tones(P) {
  const { bg, ink, muted, accent } = P;
  const [Lb, Cb, hb] = color.lch(bg);
  const coloured = Cb > 0.07;
  const own = coloured && color.hueDistance(bg, accent) >= 55;
  let glow = own ? color.withLightness(color.saturate(bg, 2), Math.min(0.86, Lb + 0.16)) : accent;
  const [Lg0, Cg0] = color.lch(glow);
  if (!own && Lg0 < Lb + 0.22) glow = color.withLightness(glow, Math.min(0.88, Lb + 0.26));
  glow = color.adjust(glow, { c: Cg0 < 0.06 ? 1 : 1.12 });
  const [L2, C2, h2] = color.lch(glow);
  // a warm palette colour lighter than the ground, for the fringe and the burn
  // (not on a coloured ground: a warm fringe over, say, blue passes through olive on its way)
  const warm = coloured ? null : [accent, ink, muted].find(c => isWarm(c) && color.lab(c)[0] > Lb + 0.1) || null;
  const mid = Lb + (L2 - Lb) * 0.5;
  let deep, hot, burnC;
  if (isWarm(glow)) {
    // the fringe leans toward red (hue about 28), from either side, so a pink glow never turns violet
    const toRed = ((28 - h2 + 540) % 360) - 180;
    const hr = (h2 + Math.sign(toRed) * Math.min(18, Math.abs(toRed)) + 360) % 360;
    deep = color.fromLch([mid, Math.min(0.2, C2 * 1.25), hr]);
    hot = color.fromLch([Math.max(0.95, L2 + 0.06), 0.055, h2 > 300 ? (h2 + 24) % 360 : Math.min(h2 + 24, 100)]);
    burnC = color.fromLch([Math.min(0.8, L2 + 0.04), Math.min(0.22, C2 * 1.3), (h2 + Math.sign(toRed) * Math.min(8, Math.abs(toRed)) + 360) % 360]);
  } else if (warm) {
    const [Lw, Cw, hw] = color.lch(warm);
    deep = color.fromLch([mid, Math.min(0.2, Math.max(Cw, 0.08) * 1.2), hw]);
    hot = color.fromLch(guard(own ? [0.96, Math.min(0.05, Cb * 0.35), hb] : [Math.max(0.95, L2 + 0.06), 0.03, h2]));
    burnC = color.fromLch([Math.max(Lw, Lb + 0.3), Math.min(0.22, Math.max(Cw, 0.09) * 1.15), hw]);
  } else {
    // a cool palette: the fringe leans toward the ground's own hue, deeper and more saturated
    const hd = Cb > 0.02 ? hb : h2;
    let dh = ((hd - h2 + 540) % 360) - 180;
    dh = Math.max(-20, Math.min(20, dh));
    let hf = (h2 + dh + 360) % 360;
    if (hf > 262 && hf < 322 && !(h2 > 262 && h2 < 322)) hf = h2;   // never lean into violet
    deep = color.fromLch([mid, Math.min(0.2, C2 * 1.3), hf]);
    hot = color.fromLch(guard(own ? [0.96, Math.min(0.05, Cb * 0.35), hb] : [Math.max(0.95, L2 + 0.06), Math.min(0.035, C2 * 0.25), h2]));
    burnC = color.fromLch([Math.min(0.78, L2), Math.min(0.2, C2 * 1.3), h2]);
  }
  const [Ld] = color.lab(deep);
  const halo = color.adjust(color.withLightness(deep, Lb + (Ld - Lb) * 0.55), { c: 1.15 });
  return {
    ground: bg, halo, deep, glow, hot, burnC, coloured, light: Lb > 0.6,
    ramp: own ? [0.04, 0.3, 0.6, 0.84] : [0.03, 0.42, 0.7, 0.92],
  };
}

// the edge farthest from the text, or the corner farthest from it; a fixed edge when given
function pickEdge(params, r, asp, seed) {
  const C = [(params.calmX - 0.5) * asp, 0.5 - params.calmY];
  if (params.edge >= 0) return { e: Math.round(params.edge), C };
  const dist = [asp / 2 - C[0], C[0] + asp / 2, 0.5 - C[1], C[1] + 0.5];   // right, left, top, bottom
  const best = Math.max(...dist);
  const ok = [0, 1, 2, 3].filter(i => dist[i] >= best * 0.7);
  // its own stream, so neighbouring seeds do not all pick the same edge
  const r2 = rng(`film-light-leak:edge:${seed}`);
  if (r2() < 0.3) return { e: 4, C };
  return { e: ok[Math.floor(r2() * ok.length)], C };
}

function uniforms({ palette, params, seed, rng: r, width, height }) {
  const T = tones(palette);
  const asp = width && height ? width / height : 4 / 3;
  const hx = asp / 2, hy = 0.5;
  const { e, C } = pickEdge(params, r, asp, seed);
  // along the edge, the source keeps to the half away from the text
  const j = (r() - 0.5) * 0.6;
  const awayY = Math.abs(C[1]) > 0.08 ? -Math.sign(C[1]) * 0.18 : 0;
  const awayX = Math.abs(C[0]) > 0.1 * asp ? -Math.sign(C[0]) * 0.18 * asp : 0;
  let src, axis, inn, stretch = 1.05;
  if (e === 1) { src = [-hx, j * 0.6 + awayY]; axis = [0, 1]; inn = [1, 0]; }
  else if (e === 2) { src = [j * asp * 0.5 + awayX, hy]; axis = [1, 0]; inn = [0, -1]; }
  else if (e === 3) { src = [j * asp * 0.5 + awayX, -hy]; axis = [1, 0]; inn = [0, 1]; }
  else if (e === 4) {
    // the corner farthest from the text area
    const sx = C[0] <= 0 ? 1 : -1, sy = C[1] <= 0 ? 1 : -1;
    src = [sx * hx, sy * hy]; inn = [-sx * Math.SQRT1_2, -sy * Math.SQRT1_2]; axis = [-inn[1], inn[0]]; stretch = 0.8;
  } else { src = [hx, j * 0.6 + awayY]; axis = [0, 1]; inn = [-1, 0]; }
  return {
    u_ground: color.labVec(T.ground),
    u_halo: color.labVec(T.halo),
    u_deep: color.labVec(T.deep),
    u_glow: color.labVec(T.glow),
    u_hot: color.labVec(T.hot),
    u_burnC: color.labVec(T.burnC),
    u_ramp: T.ramp,
    // a coloured ground needs more light to read, less grain (it turns to coloured noise there) and a
    // lighter vignette (darkening a saturated ground turns it muddy)
    u_gain: T.coloured ? 1.45 : 1,
    u_grainAmp: T.coloured ? 0.55 : T.light ? 0.9 : 1.2,
    u_vig: T.coloured ? 0.35 : 1,
    u_src: src,
    u_axis: axis,
    u_in: inn,
    u_stretch: stretch, u_corner: e === 4 ? 1 : 0,
    u_lobe: (r() < 0.5 ? -1 : 1) * (0.24 + 0.12 * r()),
  };
}

export default {
  id: 'film-light-leak',
  name: 'Film light leak',
  family: 'grain',
  params,
  mount(el, { palette, params: given, seed }) {
    return shader(el, {
      frag,
      schema: params,
      params: given,
      palette,
      seed,
      uniforms,
      fps: 30,
      still: 4,
      fallback: ({ palette: P, params: prm, seed: s, rng: r, width, height }) => {
        const T = tones(P);
        const asp = width && height ? width / height : 4 / 3;
        const { e, C } = pickEdge(prm, r, asp, s);
        const at = ['100% 50%', '0% 50%', '50% 0%', '50% 100%', `${C[0] <= 0 ? 100 : 0}% ${C[1] <= 0 ? 0 : 100}%`][e] || '100% 50%';
        return `${grainCSS(0.06, 1)}, radial-gradient(45% 70% at ${at}, ${T.hot}, ${T.glow} 22%, ${T.deep} 45%, transparent 75%), ${P.bg}`;
      },
    });
  },
};
brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).Stars: 322kUpdated Claude CodeCodexVerifiedInstall
brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).Stars: 198kUpdated Claude CodeCodexVerifiedInstall