Cadence — fault code
Variant: Fault code
A blink code: three 160ms rust flashes 200ms apart, then about 1.9s of dark, repeating — the convention appliances and routers use to report a fault number to someone with no screen. The rest is over nine times the inner gap, so the group can only be counted one way; with a rest close to the gap, three reads as "blinking", and a reader trying to count from four or two would be right half the time. Between flashes the light goes fully dark, unlike the standby floor, because a code is made of discrete marks and a half-lit gap would blur the count. The strip chart scrolls slowly enough to keep the last two groups on screen, so a viewer who arrives mid-count can read the pattern back rather than waiting a cycle, and the footer prints the decoding beside it because a code nobody can look up is just anxiety. Under reduced motion the chart freezes as a legend and the flashes slow by 1.6×, run between 20% and 85%, and soften to 60ms edges; the count is unchanged. Use it for hardware faults, failed health checks, and error states that must be legible at a distance.
The source
A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Cadence — fault code</title>
<style>
:root {
/* Neutrals — fixed, never remixed. */
--ivory: #faf9f5;
--paper: #ffffff;
--oat: #e3dacc;
--slate: #141413;
/* Knobs — the remix API. A knob exists iff declared here and used below. */
--hue: 38.8;
--lift: 0;
--chroma: 1;
--round: 1;
--speed: 1;
/* Accents — derived from the knobs with the family's offsets baked in,
so one hue roll moves them together. Defaults reproduce the original hex. */
--clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
--clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
--olive: oklch(
calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3)
);
--rust: oklch(
calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3)
);
--_muted: color-mix(in srgb, var(--slate) 54%, transparent);
--_hair: color-mix(in srgb, var(--slate) 9%, transparent);
--_trace: color-mix(in srgb, var(--slate) 62%, transparent);
--_rider: var(--rust);
/* Clock — three 160ms flashes 200ms apart, then
~1.9s of dark. The rest is over nine times the gap, so the group can
only be read one way. */
--cycle: 2.8s;
--t: calc(var(--cycle) / var(--speed));
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
min-height: 100vh;
display: grid;
place-items: center;
background: var(--ivory);
font-family:
system-ui,
-apple-system,
'Segoe UI',
Roboto,
sans-serif;
color: var(--slate);
}
.card {
width: min(300px, calc(100vw - 32px));
padding: clamp(14px, 4.5vw, 18px);
border-radius: calc(14px * var(--round));
background: var(--paper);
box-shadow:
0 0 0 1px var(--_hair),
0 1px 2px var(--_hair);
}
.head {
display: flex;
align-items: center;
gap: 10px;
}
/* The lens is always drawn, so dark reads as off — not as missing. */
.lens {
position: relative;
flex: none;
width: 10px;
height: 10px;
border-radius: 50%;
background: color-mix(in srgb, var(--oat) 70%, var(--paper));
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--slate) 14%, transparent);
}
.led {
position: absolute;
inset: 0;
border-radius: 50%;
opacity: 0;
animation: var(--_led) var(--t) linear infinite;
}
.name {
flex: 1;
min-width: 0;
font-size: 13px;
font-weight: 500;
letter-spacing: -0.01em;
}
.state {
display: grid;
justify-items: end;
font-size: 12px;
font-weight: 500;
letter-spacing: -0.005em;
}
.state span {
grid-area: 1 / 1;
}
.strip {
display: block;
width: 100%;
height: auto;
margin-top: 12px;
border-radius: calc(6px * var(--round));
background: color-mix(in srgb, var(--oat) 26%, var(--paper));
}
.grid line {
stroke: var(--_hair);
stroke-width: 1;
vector-effect: non-scaling-stroke;
}
.scroll {
animation: scroll var(--t) linear infinite;
}
.trace {
fill: none;
stroke: var(--_trace);
stroke-width: 1.4;
stroke-linejoin: round;
vector-effect: non-scaling-stroke;
}
.now {
stroke: color-mix(in srgb, var(--slate) 22%, transparent);
stroke-width: 1;
stroke-dasharray: 2 2;
vector-effect: non-scaling-stroke;
}
.rider {
fill: var(--_rider);
animation: ride var(--t) linear infinite;
}
/* Mask luminance only — the strip fades in from the left edge. */
.fade-0 {
stop-color: var(--paper);
stop-opacity: 0;
}
.fade-1 {
stop-color: var(--paper);
}
.foot {
display: flex;
justify-content: space-between;
gap: 12px;
margin-top: 10px;
font-size: 11.5px;
color: var(--_muted);
font-variant-numeric: tabular-nums;
}
.led.red {
--_led: code;
background: var(--rust);
box-shadow: 0 0 7px 1px color-mix(in srgb, var(--rust) 55%, transparent);
}
.state .s-fault {
color: var(--rust);
}
/* The strip scrolls one cycle's width per cycle on the same clock as the
light, so the level under the dashed "now" line is the light. */
@keyframes scroll {
from {
transform: translateX(0);
}
to {
transform: translateX(-70px);
}
}
@keyframes code {
0% {
opacity: 0;
}
0.893% {
opacity: 1;
}
5.714% {
opacity: 1;
}
6.607% {
opacity: 0;
}
12.857% {
opacity: 0;
}
13.75% {
opacity: 1;
}
18.571% {
opacity: 1;
}
19.464% {
opacity: 0;
}
25.714% {
opacity: 0;
}
26.607% {
opacity: 1;
}
31.429% {
opacity: 1;
}
32.321% {
opacity: 0;
}
100% {
opacity: 0;
}
}
@keyframes ride {
0% {
transform: translateY(0px);
}
0.893% {
transform: translateY(-22px);
}
5.714% {
transform: translateY(-22px);
}
6.607% {
transform: translateY(0px);
}
12.857% {
transform: translateY(0px);
}
13.75% {
transform: translateY(-22px);
}
18.571% {
transform: translateY(-22px);
}
19.464% {
transform: translateY(0px);
}
25.714% {
transform: translateY(0px);
}
26.607% {
transform: translateY(-22px);
}
31.429% {
transform: translateY(-22px);
}
32.321% {
transform: translateY(0px);
}
100% {
transform: translateY(0px);
}
}
@media (prefers-reduced-motion: reduce) {
/* The rhythm is the information, so the light keeps it — slower and
with a raised floor, so it never strobes. The chart stops scrolling
and stays as a legend of the pattern; the rider goes. */
.led.red {
animation-name: code-soft;
animation-duration: calc(var(--t) * 1.6);
}
.scroll {
animation: none;
}
.rider {
display: none;
}
@keyframes code-soft {
0% {
opacity: 0.2;
}
2.143% {
opacity: 0.85;
}
5.714% {
opacity: 0.85;
}
7.857% {
opacity: 0.2;
}
12.857% {
opacity: 0.2;
}
15% {
opacity: 0.85;
}
18.571% {
opacity: 0.85;
}
20.714% {
opacity: 0.2;
}
25.714% {
opacity: 0.2;
}
27.857% {
opacity: 0.85;
}
31.429% {
opacity: 0.85;
}
33.571% {
opacity: 0.2;
}
100% {
opacity: 0.2;
}
}
}
</style>
</head>
<body>
<div
class="card"
role="img"
aria-label="A rust indicator flashes three times quickly, then stays dark for a long rest before repeating. A strip chart beneath shows the flashes as groups of three square pulses with wide gaps between groups. The footer reads code 3, probe offline."
>
<div class="head">
<span class="lens" aria-hidden="true"><i class="led red"></i></span>
<span class="name">Sensor hub</span>
<span class="state"><span class="s-fault">Fault</span></span>
</div>
<svg class="strip" viewBox="0 0 200 36" aria-hidden="true">
<defs>
<clipPath id="past"><rect x="0" y="0" width="184" height="36" /></clipPath>
<linearGradient id="fade-g" x1="0" x2="1">
<stop class="fade-0" offset="0" />
<stop class="fade-1" offset="0.22" />
</linearGradient>
<mask id="fade"><rect width="200" height="36" fill="url(#fade-g)" /></mask>
</defs>
<g class="grid">
<line x1="0" x2="200" y1="30" y2="30" />
<line x1="166.5" x2="166.5" y1="4" y2="30" />
<line x1="149" x2="149" y1="4" y2="30" />
<line x1="131.5" x2="131.5" y1="4" y2="30" />
<line x1="114" x2="114" y1="4" y2="30" />
<line x1="96.5" x2="96.5" y1="4" y2="30" />
<line x1="79" x2="79" y1="4" y2="30" />
<line x1="61.5" x2="61.5" y1="4" y2="30" />
<line x1="44" x2="44" y1="4" y2="30" />
<line x1="26.5" x2="26.5" y1="4" y2="30" />
<line x1="9" x2="9" y1="4" y2="30" />
</g>
<g clip-path="url(#past)" mask="url(#fade)">
<g class="scroll">
<path
class="trace"
d="M0 30 L44 30 L44 30 L44 30 L44.63 8 L48 8 L48.63 30 L53 30 L53.63 8 L57 8 L57.63 30 L62 30 L62.63 8 L66 8 L66.63 30 L114 30 L114 30 L114 30 L114.63 8 L118 8 L118.63 30 L123 30 L123.63 8 L127 8 L127.63 30 L132 30 L132.63 8 L136 8 L136.63 30 L184 30 L184 30 L184 30 L184.63 8 L188 8 L188.63 30 L193 30 L193.63 8 L197 8 L197.63 30 L202 30 L202.63 8 L206 8 L206.63 30 L254 30"
/>
</g>
</g>
<line class="now" x1="184" x2="184" y1="3" y2="33" />
<circle class="rider" cx="184" cy="30" r="2.2" />
</svg>
<div class="foot">
<span>Three flashes, then rest</span><span>Code 3 · probe offline</span>
</div>
</div>
</body>
</html>
The variant family
Same idea, one axis moved. Compare them side by side before you commit.