lookbkdev/lookbk-skills / skills/laser-etch-hero
laser-etch-hero
VerifiedBuild a website hero where a laser engraver cuts the headline into a real plate - a vector contour pass, then a gantry raster line by line or a galvo hatching glyph by glyph - and one low raking lamp shows the cut's depth: char, smoke and a glowing front on maple, sparks and frosted metal on black anodised aluminium, or a pale frost on slate; the pointer moves the lamp. Two art-directed layouts: a maple board on a bench with the copy on a clamp bar (centred lockup), or a full-bleed anodised plate with the headline across the width (type as the effect). One self-contained HTML page plus a paste-in embed on the Motion Heroes kit v2, checked at four widths for text size, contrast and clearance, with a baked still picture if WebGL fails and a frame-exact looping 1080p MP4 that opens on the settled plate. Use for makers, engravers, workshops, tools, instruments, gifts or any product that is made, marked or personalised.
| File | Kind | Size |
|---|---|---|
| NOTICE.md | markdown | 1.1 KB |
| SKILL.md | skill md | 8.3 KB |
| TESTED.json | config | 975 B |
| assets/anodised.webp | binary | 948 B |
| assets/maple.webp | binary | 30.2 KB |
| assets/slate.webp | binary | 7.6 KB |
| examples/varde/hero.json | config | 1.3 KB |
| examples/wrenfold/hero.json | config | 1.3 KB |
| scripts/build.mjs | script | 263 B |
| scripts/check.mjs | script | 179 B |
| scripts/chrome.mjs | script | 3.6 KB |
| scripts/color.mjs | script | 1.4 KB |
| scripts/effect/effect.js | script | 43.8 KB |
| scripts/effect/effect.mjs | script | 5.5 KB |
| scripts/inline.mjs | script | 1.7 KB |
| scripts/kit/KIT.md | markdown | 13.7 KB |
| scripts/kit/build.mjs | script | 47.4 KB |
| scripts/kit/cdp.mjs | script | 5.1 KB |
| scripts/kit/check.mjs | script | 15.7 KB |
| scripts/kit/fonts.json | config | 5.4 KB |
| scripts/kit/record.mjs | script | 8.1 KB |
| scripts/kit/runtime.js | script | 22.5 KB |
| scripts/kit/shell.css | other | 18.7 KB |
| scripts/kit/three.json | config | 6.3 KB |
| scripts/markup.mjs | script | 6.2 KB |
| scripts/record.mjs | script | 255 B |
| scripts/screenshot.mjs | script | 1.8 KB |
scripts/color.mjs
View on GitHub// Colour helpers: mixing, WCAG contrast, and nudging a colour until it reads.
const HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i
export const isHex = (c) => HEX.test(c)
export function rgb(hex) {
let h = hex.slice(1)
if (h.length === 3) h = h.replace(/(.)/g, '$1$1')
return [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16))
}
const toHex = (c) =>
'#' +
c
.map((v) =>
Math.round(Math.max(0, Math.min(255, v)))
.toString(16)
.padStart(2, '0'),
)
.join('')
/** a moved t of the way to b. */
export const mix = (a, b, t) => {
const [x, y] = [rgb(a), rgb(b)]
return toHex(x.map((v, i) => v + (y[i] - v) * t))
}
export function lum(hex) {
const l = rgb(hex).map((v) => {
v /= 255
return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4
})
return 0.2126 * l[0] + 0.7152 * l[1] + 0.0722 * l[2]
}
export function contrast(a, b) {
const [x, y] = [lum(a), lum(b)]
return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05)
}
export const isDark = (c) => lum(c) < 0.2
/** `color`, moved toward white or black (whichever helps) until it reads on every one of `grounds`. */
export function readable(color, grounds, ratio = 4.5) {
const list = [grounds].flat()
const to = isDark(list[0]) ? '#ffffff' : '#000000'
let c = color
for (
let t = 0.04;
list.some((g) => contrast(c, g) < ratio) && t <= 1;
t += 0.04
)
c = mix(color, to, t)
return c
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |