Defaults and tokens
Windgram ships one reference look. Configure scene behaviour through
SceneOptions and visual values through the renderer’s --wg-* CSS tokens.
import type { WindgramProfile } from "windgram/contract";import { buildScene, DEFAULT_OVERLAYS } from "windgram/scene";
export function buildClubScene(profile: WindgramProfile) { return buildScene(profile, { timeZone: profile.site.timeZone ?? "Etc/UTC", smooth: false, overlays: { ...DEFAULT_OVERLAYS, thermalIndex: true, }, });}DEFAULT_OVERLAYS exposes the package defaults when a control must enumerate
every layer. Omit overlays when the reference defaults are sufficient.
Read token authorities
Section titled “Read token authorities”windgram/svg exports four maps:
TOKEN_DEFAULTScontains every non-stability renderer token;STABILITY_TOKEN_DEFAULTScontains the ordered eight-class stability ramp;SERIES_TOKENSmaps key-entry ids to the token that themes each line ("wg-series-cloud-base"→cloud-base); andFIELD_STYLE_DEFAULTScarries each field-overlay class’s fill token and opacity for legend chips built outside SVG.
Token keys omit the CSS prefix: surface maps to --wg-surface, and
stable maps to --wg-stab-stable. Read the maps for legends and swatches;
override CSS custom properties on an ancestor for a downstream presentation.
This page does exactly that — every default below is imported from the
package when the site builds:
Every default, read from the package
Token keys omit the CSS prefix: surface maps to --wg-surface, stable to --wg-stab-stable.
The package's exported defaults rendered as swatches and values: the 8-class stability ramp, all 65 renderer tokens, the CAPE class thresholds, and which of the 26 overlays default on.
Stability ramp — STABILITY_TOKEN_DEFAULTS
very-unstable#d95f52unstable#de8f3aconditional-strong#c67eb6conditional#aeaad9near-neutral#d7b29bstable#768bb9inverted#9aa19dstrong-inversion#b3b9b6
Scene defaults — DEFAULT_CAPE_CLASSES · DEFAULT_OVERLAYS
CAPE strip classes: watch from 300, risk from 800, severe from 1500 J/kg; a cell dims when CIN ≤ -50 J/kg.
Overlays defaulting on (20): temperature, wind, clouds, thermalStrength, stability, cape, gusts, pblHeight, cloudLayers, smoke, observedIrradiance, observedAot, pressure, precipitation, boundaryLayerTop, cloudBase, usableLiftTop, launch, selectedHour, surfaceTemperature.
Defaulting off (6): thermalIndex, windShear, buoyancyShear, dewPoint, relativeHumidity, verticalVelocity.
Renderer tokens — TOKEN_DEFAULTS (65)
- Aa
font"IBM Plex Sans", ui-sans-serif, system-ui, sans-serif - Aa
font-mono"IBM Plex Mono", ui-monospace, monospace - Aa
text-strip-name10.5px - Aa
text-strip-unit9.5px - Aa
text-strip-scale8px - Aa
text-row-tag7.5px - Aa
text-tick10.5px - Aa
text-hour-tick11px - Aa
text-gust9.5px - Aa
text-series-label10.5px - Aa
text-launch10.5px - Aa
text-surface-temp9.5px - Aa
text-key-title9px - Aa
text-key-boundary8px - Aa
text-key-group8px key-group-ink#ffffffkey-group-halo#00000066surface#fffdf8strip-bg#f2f4f1rule#776956ink#152529ink-soft#2f454aink-mute#40565ahalo#fffdf8halo-seriestransparenthalo-barb#355963accent#913b0cselection#913b0ctemp#913b0cpressure#963f36rain#207a83cloud#5b6969lift#9a7500bs#6d597acape#8a4a08cape-calm#dde3d5cape-watch#e7c46ccape-risk#d98243cape-severe#c04f3agust#355963pbl#56609bsmoke#8c5a3csun#b07a1asun-dim#43404ati-weak#f4e3c0ti-fair#ecc57eti-good#de9b4eti-strong#c96a33shear-light#cfc3deshear-moderate#a58ec4shear-strong#7b5ea7rh-60#d3e0e3rh-80#a9c7cfrh-95#7fadbbomega-lift#8dc2a0omega-lift-strong#56a377omega-sink#d3a68fomega-sink-strong#bd7d5cboundary#a46b10cloud-base#355963cloud-marker#f8f3d8usable#2179adfreezing#2b748fdewpoint#3a7d4fwind#ffffff
import { STABILITY_TOKEN_DEFAULTS } from "windgram/svg";
export const stabilitySwatches = Object.entries(STABILITY_TOKEN_DEFAULTS).map( ([name, color]) => ({ name, color }),);The reference renderer keeps the stability field pale so lines, markers, labels, and white wind barbs remain foreground. The stability-ramp research article records the measured palette constraints.
Display windows, overlay choices, CAPE classes, sink rates, and local colour
overrides belong to the downstream publisher. Pass them directly to
buildScene or the consuming stylesheet.