@allternit/look-packs defines the type, validates it, turns it into CSS variables and warns about unreadable color pairs.
A pack
font), radius and spacing. Aliases ("{color.base}") and $type inheritance from groups are resolved.
CSS variables
--vp-<path>: color.on-brand is --vp-color-on-brand. The view kit reads these names.
Values that could break out of a CSS declaration (;, braces, url(, @import, comments) are dropped and reported, never emitted. Alias cycles and unknown aliases are reported too.
Validate
defineApp throws on errors.
Contrast check
checkContrast measures these foreground/background pairs, in light mode and again with the dark overrides applied, and skips any pair the pack does not define:
A pair under 4.5:1 is a warning, not an error: it shows in
validateLookPack, app.lint() and allternit test, and does not block. Colors the checker cannot parse (for example oklch()) are reported as info, since they cannot be measured here.
The default look
ALLTERNIT_DEFAULT_LOOK is the pack Allternit uses when an app has none: a white surface and neutral ink. Start from it if you only want to change one or two tokens.