kwakseongjae/oh-my-design / .claude/skills/omd-shader-hero
omd:shader-hero
VerifiedOne full-bleed launch hero in two inks from the project's DESIGN.md: the base color and exactly one brand color, as a slowly folding ordered-dither (Bayer) field — a print/riso look, not a generic gradient. Two flat inks never blend, so there is no mud. The copy sits on a hard-edged base-ink knockout, so headline and sub copy both clear 4.5:1 by construction, and a verify script measures it across the whole timeline. Reads Core v2 tokens (and Google-compatible frontmatter), refuses to invent a palette, ships a CSS halftone poster fallback, respects prefers-reduced-motion, ~7 KiB gzip of library JS. Use for a launch page, product hero, waitlist, event or rebrand first screen that needs motion in brand color. Triggers: '셰이더 히어로', '런칭 히어로', '디더링 배경', '리소 느낌 히어로', '브랜드 컬러 배경 애니메이션', 'dither hero', 'shader hero from DESIGN.md', 'launch hero background', 'riso print hero', 'シェーダーのヒーロー', '著陸頁主視覺 shader'. Whole scroll-native landing → omd-landing / omd-aphrodite. CJK headline ink effect → omd-cjk-type-shader. Brand tokens missing → omd-init first.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.6 KB |
| examples/DESIGN.example.md | markdown | 993 B |
| examples/hero.html | other | 6.6 KB |
| scripts/tokens.mjs | script | 8.3 KB |
| scripts/verify.mjs | script | 9.1 KB |
examples/hero.html
View on GitHub<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>새벽 · Shader Hero</title>
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css">
<!-- Filled by scripts/tokens.mjs --write from DESIGN.md. Every color below is a brand token; nothing is invented here. -->
<style id="hero-vars">:root{--hero-c0:#0b1026;--hero-c1:#ff6b3d;--hero-text:#ffffff;--hero-scrim:#0b1026;--hero-scrim-a:1;}</style>
<script type="application/json" id="hero-tokens">{"stops":["#0b1026","#ff6b3d"],"text":"#ffffff","scrim":"#0b1026","scrimAlpha":1,"source":"examples/DESIGN.example.md"}</script>
<style>
/* Background on html, never body: a body background paints over a fixed/negative-z scene (tf-shaders pitfall). */
html { background: var(--hero-c0); }
body { margin: 0; color: var(--hero-text);
font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
font-size: 1rem; line-height: 1.5; letter-spacing: 0; }
:lang(ko) { font-synthesis: none; }
.hero { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
/* Poster: the same two inks as a CSS halftone (dots of the brand ink, denser toward two corners).
It is the no-WebGL2 path and the first paint before the shader. */
.hero-poster, .hero-scene { position: absolute; inset: 0; z-index: -2; }
.hero-poster { background: var(--hero-c0); }
.hero-poster::before {
content: ""; position: absolute; inset: 0;
background: radial-gradient(circle, var(--hero-c1) 1.2px, transparent 1.6px) 0 0 / 6px 6px;
-webkit-mask: radial-gradient(70% 80% at 12% 90%, #000 0%, transparent 70%), radial-gradient(60% 70% at 92% 8%, #000 0%, transparent 65%);
mask: radial-gradient(70% 80% at 12% 90%, #000 0%, transparent 70%), radial-gradient(60% 70% at 92% 8%, #000 0%, transparent 65%);
}
.hero-scene { z-index: -1; opacity: 0; transition: opacity 600ms cubic-bezier(.22,1,.36,1); }
.hero-scene.is-ready { opacity: 1; }
.hero-copy { position: relative; max-width: min(72rem, 100% - 32px); padding: 0 16px; text-align: center; }
/* Knockout: an opaque base-ink panel behind the whole copy box, hard-edged like a print cut-out.
No translucent scrim and no feather: either would mix base over brand dots into mud. */
.hero-copy::before {
content: ""; position: absolute; inset: -2rem -2.5rem; z-index: -1; pointer-events: none;
background: color-mix(in srgb, var(--hero-scrim) calc(var(--hero-scrim-a) * 100%), transparent);
}
.hero h1 {
margin: 0; font-weight: 700;
font-size: clamp(2.6rem, 7vw, 6rem);
line-height: 1.3; /* /hangul HG-5: wrapping Korean display text stays >= 1.3 */
letter-spacing: -0.02em; /* HG-7: never below -0.03em */
word-break: keep-all; overflow-wrap: anywhere; text-wrap: balance;
}
.hero p { margin: 1.2rem auto 0; max-width: 34em; font-size: clamp(1rem, 1.6vw, 1.25rem); word-break: keep-all; overflow-wrap: anywhere; }
.hero a {
display: inline-flex; align-items: center; min-height: 48px; margin-top: 2rem; padding: 0 1.5rem;
border-radius: 0; /* radius comes from DESIGN.md radius tokens; the fixture defines none */ background: var(--hero-text); color: var(--hero-c0); font-weight: 600; text-decoration: none;
}
.hero a:focus-visible { outline: 2px solid var(--hero-text); outline-offset: 3px; }
.hero small { position: absolute; left: 16px; bottom: 16px; font-size: 0.75rem; padding: .2rem .45rem; background: var(--hero-c0); } /* small text gets its own knockout too */
</style>
</head>
<body>
<section class="hero" aria-labelledby="hero-title">
<div class="hero-poster" aria-hidden="true"></div>
<div class="hero-scene" aria-hidden="true" data-speed="0.3" data-px="3"></div>
<div class="hero-copy">
<h1 id="hero-title">해가 뜨기 전, 가장 조용한 1분</h1>
<p>새벽은 아침 루틴을 하루 1분부터 쌓게 돕는 앱입니다.</p>
<a href="#">미리 받아보기</a>
</div>
<small>가상 브랜드 데모 · omd-shader-hero · 토큰: <span data-token-source></span></small>
</section>
<script type="module">
// Pinned per-file ESM builds of Paper Shaders (Apache-2.0, https://github.com/paper-design/shaders).
// Imported from the CDN, not vendored. Paper has no telemetry (its only fetch() reads a local blob's type).
import { ShaderMount } from 'https://cdn.jsdelivr.net/npm/@paper-design/shaders@0.0.81/dist/shader-mount.js/+esm';
import { ditheringFragmentShader } from 'https://cdn.jsdelivr.net/npm/@paper-design/shaders@0.0.81/dist/shaders/dithering.js/+esm';
const tokens = JSON.parse(document.getElementById('hero-tokens').textContent);
document.querySelector('[data-token-source]').textContent = tokens.source;
const el = document.querySelector('.hero-scene');
const hex = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16) / 255).concat(1);
const reduce = matchMedia('(prefers-reduced-motion: reduce)').matches;
const speed = reduce ? 0 : +el.dataset.speed; // param 1: how fast the warp field drifts (0 = still)
const px = +el.dataset.px; // param 2: dither cell size in CSS px (2 fine .. 6 coarse print)
const STILL_FRAME = 8000; // the composition reduced-motion users get
const [back, front] = tokens.stops; // base ink + exactly one brand ink: no blends, no mud
let mount = null;
const gl2 = (() => { try { return !!document.createElement('canvas').getContext('webgl2'); } catch { return false; } })();
if (gl2) {
try {
mount = new ShaderMount(el, ditheringFragmentShader, {
u_colorBack: hex(back),
u_colorFront: hex(front),
u_shape: 2, // DitheringShapes.warp: slow folds of brand light
u_type: 3, // DitheringTypes['4x4']: ordered Bayer dots, the print look
u_pxSize: px,
// pattern sizing (Paper's defaultPatternSizing)
u_fit: 0, u_scale: 1, u_rotation: 0, u_offsetX: 0, u_offsetY: 0, u_originX: 0.5, u_originY: 0.5, u_worldWidth: 0, u_worldHeight: 0,
}, undefined, speed, STILL_FRAME, 1, 1920 * 1080); // minPixelRatio 1: the dither cell size is the resolution
requestAnimationFrame(() => requestAnimationFrame(() => el.classList.add('is-ready')));
} catch { mount = null; }
}
document.documentElement.dataset.hero = mount ? (reduce ? 'still' : 'shader') : 'poster';
window.__hero = { mount, tokens };
</script>
</body>
</html>
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 323k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |