zprf check
From Zacess Profile v0.2.2. Edit this page on GitHub
Check every colour pair of one or more profiles and exit non-zero on any failure.
zprf check [OPTIONS] <PROFILES>...check derives any missing colour, then checks every pair of every file given against the
profile's floors: contrast, highlight distance and the colour vision checks.
A bad file is reported and the rest are still checked.
Options
| Option | Does |
|---|---|
<PROFILES>... |
Profile files to check |
-v, --verbose |
Print every pair, not only the failures and the tightest one |
--no-derive |
Fail when the profile leaves any colour to be derived |
-h, --help |
Print help |
Exit codes
| Code | When |
|---|---|
| 0 | Every profile passes |
| 1 | A pair fails |
| 2 | A file is unreadable or invalid. Also when no colour can be derived to meet a floor |
Examples
Check one starter profile:
zprf check profiles/zacess-deep-contrast-dark.tomlpass profiles/zacess-deep-contrast-dark.toml (Zacess Deep Contrast Dark)
224 pairs against text 7:1, non-text 3:1, overlay 4.5:1, terminal 7:1 and dim terminal 4.5:1, with paired colours 0.05 apart in tone and 0.04 under colour vision deficiencies
tightest terminal.ansi[4] #8888ff on background #000000: 7.01:1Check every starter profile at once:
zprf check profiles/*.tomlA copy of that profile with its comment colour set to #555555 fails, with each failing pair
named:
FAIL dim-comments.toml (Zacess Deep Contrast Dark)
224 pairs against text 7:1, non-text 3:1, overlay 4.5:1, terminal 7:1 and dim terminal 4.5:1, with paired colours 0.05 apart in tone and 0.04 under colour vision deficiencies
FAIL syntax.comment #555555 on background #000000: 2.81:1, below needs.contrast.text of 7:1
FAIL syntax.comment #555555 on surface #000000: 2.81:1, below needs.contrast.text of 7:1
FAIL syntax.comment #555555 on surface_alt #0a0a0a: 2.65:1, below needs.contrast.text of 7:1
FAIL syntax.comment #555555 on line_highlight #262626: 2.02:1, below needs.contrast.overlay of 4.5:1
FAIL syntax.comment #555555 on selection_soft #720072: 1.43:1, below needs.contrast.overlay of 4.5:1
tightest syntax.comment #555555 on selection_soft #720072: 1.43:1, below needs.contrast.overlay of 4.5:1Fail a profile that still leaves colours to derive, for example before committing it:
zprf check --no-derive mine.toml