Skip to content

2.0.0

Latest

Choose a tag to compare

@DutchDiederik DutchDiederik released this 10 Aug 16:15
· 7 commits to main since this release
9c698fd

Amber Console 2.0.0

1.0 had two simulations. 2.0 has eleven across two different technologies with added and refined effects. It also adds three new demos with a control panel, and extensive documentation.


How to use it

A <link> tag is the entire install. The framework is one stylesheet — dist/amber-console.css — and everything described below is in it. Download that file along with the fonts/ directory, keep the two as siblings so the @font-face rules resolve ../fonts/ correctly, and link it:

<link rel="stylesheet" href="amber-console.css">

That is the whole setup. No build step, no bundler, no package manager, and no JavaScript required for any component's appearance. dist/ also carries a minified build for production, and two @layer-wrapped builds for dropping the framework into an app that already owns the page — use one of those instead of the default, never alongside it. The two JavaScript modules are optional, and optional separately: one adds the tablist keyboard model, dialogs and the setup board, the other adds the three persistence effects CSS cannot reach. Neither imports the other, and the stylesheet works with or without them.

The P7 and P39 CRT simulations are the only ones with JS effects. These effects are optional and the simulations also work and look just fine without them.

The System guide explains and shows all the elements.

If you would rather start from something that already runs to get a feel for the system, take starter.html from the repository root. It is a single commented file you open by double-clicking — no server, no build, no package manager, and no script on the page at all. It arrives as a small working console rather than a swatch sheet: the operate/instrument grid split, four button states, an input well, a select, status bits, an unscripted toggle, a meter with its scale and a blinking alarm, plus a dimmed instrument panel and a third region on .ac-rounded so both corner styles are on screen at once.


Eleven emitters across two display technologies

1.0 shipped neon and amber. 2.0 ships four plasma gases — neon, helium, argon, krypton — and seven CRT phosphors — P1, P3, P4, P7, P11, P31, P39.

Nine of the eleven were not picked by eye. scripts/derive-gas.mjs takes the published emission lines for a gas, or the band shape for a phosphor, integrates them against the CIE 1931 standard observer, and solves each of the five stops to a fixed contrast ratio. npm test re-derives them and fails if anyone has hand-edited a value.

Naming a palette takes two attributes, and that is the point:

<html data-ac-tech="crt" data-ac-emitter="p7">

A color word means different physics on different glass. neon is a gas and exists only under plasma; p3 is a phosphor and exists only under CRT. Mismatch them and you get nothing rather than the wrong hardware.

Every one of the eleven passes the same contrast gate. A ratio that clears under one emitter and fails under another is a build failure. What changes between displays is the hue — never the legibility.

Plasma vs CRT

Or, screen door vs scanlines. Flip between PLASMA and CRT on the board and the texture changes.

  • The plasma panel is crossed in both axes on a 3px pitch; a cell lights where a row wire meets a column wire, boxed in on four sides by barrier ribs that emit nothing.
  • The CRT tube gets horizontal blanking gaps only, at twice the contrast, because a scanning beam has no vertical structure to draw.

CRT simulations also feature a retrace band sweeping down the frame that is deep and visible on the short phosphors and almost absent on the long ones.

  • P11, P31 and P4 were fully dark between frames, so they get the strongest band and no trail at all
  • P1 and P3 sit in the middle
  • P7 and P39 were rock steady at any refresh rate — barely any band, and they pay for it in smear

Simulating the distinctive CRT flicker accurately is practically impossible, considering the wide variety of display technologies on modern devices that display this framework in the real world. The retrace band is as close as I could get.

Special case: CRT P7

The radar phosphor is two coatings, not one. The beam writes into a blue layer that decays in microseconds; that layer's own photons pump a yellow-green layer behind it which holds for seconds.

So the ink is blue and the halo is green. It is the only palette here whose glow is a different spectrum from its text — which inverts a rule the rest of the system relies on, and is exactly why P7 was fitted to radar sets.

Which brings us to:

Four demo screens

1.0 had a console and a guide. 2.0 adds three more, and each one loads a different part of the system:

DEMO HIGHLIGHTS
ORION-70 projection console Original demo, text ghosting
D-STAR server dashboard Bars & graphs
SEASCAN RM-12 radar PPI radar to specifically demo the P7 effect
TELEMARK 400 market terminal High data density & highlight demo

The radar brings a new component, .ac-sweep, and it is pure CSS. The trail is a conic-gradient — the phosphor's decay curve read in degrees instead of milliseconds. Angle behind the beam is time since that bearing was painted, so the same curve lands on the same shape. No canvas, no script, no per-frame work.

Classic buttons!

Cut corners, an extruded key edge, and the label parked top-left with the body left empty for a value. This is the default now.

The four corners are not cut the same: 2 / 4 / 8 / 4 px, deepest at the near corner, because these keys were drawn as solid objects lit from the top left. Cut all four alike and a key reads as an octagon.

.ac-rounded is the way back to the arc, at any scope.

Control panel

A new setup board sits at the top of every documentation page controlling the following: Plasma gas/CRT phosphors simulation, Plasma/CRT display simulation, CRT retrace band on/off, Javascript enabled or not, and classic/modern buttons. Clicking on one of the Plasma gases or CRT phosphors in the first two panels sets the other toggles correctly for the simulation, but these can be changed for experimentation and taste.

Turning off Javascript disables ghosting, the scroll smear, and framebuffer decay (only relevant for P7 and P39).

The system guide & reference

The system guide is now nine chapters with live specimens throughout, plus a complete reference: every class, every root attribute, every token split by whether you set it or the framework does, every stored key, and the four environments the stylesheet answers on its own.


⚠️ Breaking: every token is --ac-* prefixed

This is the only breaking change, and it fails silently.

/* 1.x — silently ignored in 2.0 */
:root { --ink: #ffb000; --radius: 0; }

/* 2.0 */
:root { --ac-ink: #ffb000; --ac-radius: 0; }

--ink, --gap, --cols, --amber-*, --gas-* and the rest were removed, not aliased. A custom property that no longer exists resolves to nothing rather than erroring, so nothing will warn you — grep for it.

They were kept as aliases briefly and it was worse than useless: nothing read the old names, so --ink: red did nothing and said nothing. An absent name at least behaves consistently.

Why it had to happen: dist/amber-console.layer.css exists so the framework can be embedded in an app that owns the page, and cascade layers do not protect custom properties. A host that happened to use --gap silently re-cornered every control in the framework.

If you never overrode a token, 2.0 is a drop-in. Full migration table in DEPRECATIONS.md.

Still working, removed in 3.0: data-ac-gas, data-ac-gas-toggle, AmberConsole.afterglow().


Still true

Zero runtime dependencies. No build step. No JavaScript required for any component's appearance. 54 kb minified, 9.4 kb gzipped. Works from file://.

forced-colors, @media print and prefers-reduced-motion are all handled, and the palette inverts to black-on-white on paper by re-pointing tokens rather than restating components.

Gated on every commit: stylistic lint, seven mechanical prohibitions, palette re-derivation, a WCAG contrast table across all eleven palettes, 920 computed-style probes and 99 screenshot captures.

Thanks

  • @zigmoo for catching the broken live-demo links.
  • Everyone on X for liking, commenting, and re-X'ing (?) my original post. It motivated me to take this to the next level.

Full detail: CHANGELOG.md — every change, with the reasoning.