Users and CI expect no-color.org semantics for accessibility and logs.
Examples
Platform spec article
Examples
Spec standingStandard
-
Any non-empty NO_COLOR strips ANSI emission.
Context
Decision
Rule Detail NO_COLORNon-empty value must force ShouldEmitAnsi()falseReference no-color.org Consequences
Capability probes and markup render paths consult the same gate.
Verification anchors
CapabilitiesTests.bd;Console/Capabilities.bd. -
COLORTERM presence selects TrueColor when color allowed.
Context
Modern terminals advertise truecolor via COLORTERM without breaking NO_COLOR.
Decision
Rule Detail Probe COLORTERMset →TrueColorwhen color not strippedFORCE_COLORMay enable emission on non-TTY stdout Consequences
EffectiveColorModel reflects env probes before SGR downgrade (see D-CORE-TERM-0003).
Verification anchors
CapabilitiesTests.bd. -
RGB downgrades through palette ladders automatically.
Context
Callers should not manually pick CSI color modes per terminal.
Decision
Rule Detail Downgrade RGB → indexed → basic is lossy API No per-sequence model selector on public helpers Consequences
Styled output remains readable on Basic16 hosts without author branches.
Verification anchors
AnsiSgrGoldenTests.bd; capability + SGR integration.
- Contracts and edge cases MUST rules for capability probing and color stripping.
- Design model Capability record, color models, and environment-driven probing.
- Examples Checking capabilities before custom styling.
- Flow and algorithm Probe and strip algorithms for terminal capabilities.
- Verification and traceability Tests and sources for capability probing.
0 revisions (git unavailable at build; counts may be empty)
No commits recorded for this path.
| Section id | Required | Found |
|---|---|---|
what-this-feature-specifies | yes | yes |
implementation-anchors | yes | yes |
Full tree: run pnpm verify:platform-spec-layout (writes src/generated/platform-spec-layout-report.json).
Purpose
Section titled “Purpose”Document examples for the Console Capabilities feature: role-specific normative detail beyond the feature hub.
Canonical references
Section titled “Canonical references”- Feature hub: Console Capabilities
- Sibling articles in this bundle (design model, contracts, flow, examples, verification)
Detailed behavior
Section titled “Detailed behavior”if Console.Capabilities.ShouldEmitAnsi() { Console.FormatLine("[bold]interactive[/]");} else { System.Output.WriteLine("interactive");}Console.Capabilities.Capabilities caps = Console.Capabilities.ProbeStdout();Console.Capabilities.ColorModel model = Console.Capabilities.EffectiveColorModel(caps);// use model for custom RGB downgrade outside SgrBuilderFor escape tables and SGR parameters, see ANSI escape model.
Verification
Section titled “Verification”See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.
Related topics
Section titled “Related topics”- Parent feature hub and Terminal and console area