Widgets never name colours directly. They use theme roles: Text, Muted, Accent, Pass, Warn, Fail, Info, Skip, Running, Pending, Border, Title, Header, Surface, Focus and six chart series. A theme maps each role to a 24-bit colour with its 256 and 16-colour fallbacks, so a role stays distinguishable on every tier.
╭─ TestimoX ───────────────── ad.evotec.xyz ─╮ │ ✓ Discover 2.1s › ✓ Collect 14s │ │ ⠋ Evaluate 64% │ │ ██████████████████████████████████████████ │ │ █ Passed 412 82% █ Warnings 51 10% │ │ █ Failed 23 4% █ Skipped 14 2% │ │ rules/s ▃▃▃▃▄▄▄▄▅▅▅▆▅▆▇▆▇▇▇█ 57/s │ ╰────────────────────────────────────────────╯
╭─ TestimoX ───────────────── ad.evotec.xyz ─╮ │ ✓ Discover 2.1s › ✓ Collect 14s │ │ ⠋ Evaluate 64% │ │ ██████████████████████████████████████████ │ │ █ Passed 412 82% █ Warnings 51 10% │ │ █ Failed 23 4% █ Skipped 14 2% │ │ rules/s ▃▃▃▃▄▄▄▄▅▅▅▆▅▆▇▆▇▇▇█ 57/s │ ╰────────────────────────────────────────────╯
╭─ TestimoX ───────────────── ad.evotec.xyz ─╮ │ ✓ Discover 2.1s › ✓ Collect 14s │ │ ⠋ Evaluate 64% │ │ ██████████████████████████████████████████ │ │ █ Passed 412 82% █ Warnings 51 10% │ │ █ Failed 23 4% █ Skipped 14 2% │ │ rules/s ▃▃▃▃▄▄▄▄▅▅▅▆▅▆▇▆▇▇▇█ 57/s │ ╰────────────────────────────────────────────╯
Choosing the theme
CONSOLEMONSTER_THEME=light|dark|auto(defaultauto), orTerminalProfile.WithThemePreferencein code.autoreads the console background colour in conhost. In Windows Terminal, which does not report its scheme to console programs,autopicks the dark theme; setCONSOLEMONSTER_THEME=lightfor a light scheme.Set-ConsoleThemein PowerShell,LiveSessionOptions.Themefor one session.
The light theme meets WCAG contrast on white, and the dark theme keeps titles readable on a light background that could not be detected, because titles, headers and highlights use the terminal's own foreground in bold.
Markup and roles
Theme roles are markup tags ([pass], [fail], [warn], [muted], [accent] and the others), also as backgrounds ([white on fail]). In PowerShell, -Role on New-ConsoleText and Write-ConsoleText does the same. Without colour, a status role adds its symbol, so status is never shown by colour alone.
Reduction per tier
Colours given as hex, rgb() or palette names are reduced for each tier the way the SGR encoder sends them: to the nearest of the 256 xterm colours on a 256-colour console, and to the nearest of the 16 console colours on a 16-colour one. Theme roles use the 256 and 16-colour values the theme defines instead of the nearest match. The widget gallery shows every widget at each tier.