Skip to content

std:text/ColorMode

Canonical occurrence: protos/lib/text/ColorMode.protos · Protos revision: e99b712ecf658a527b1fe82c8beba2c1286d8dc9.

Reusable color-mode policy. The three modes are AUTO, ALWAYS, and NEVER. Each mode is its canonical String value: ColorMode.AUTO is exactly "AUTO", so a mode is immutable, compares with === and ==, and keeps its identity across Actor, Task, and Process boundaries without any shared registry. No other spelling, alias, or letter case is a mode.

Resolution is pure policy: it consults no environment, Process, standard stream, terminal, or global configuration. Whether AUTO enables styling is decided entirely by the caller, which supplies that Boolean to resolve and passes the resolved Boolean to a renderer such as std:text/ANSI.

This page lists the complete mechanically observable top-level slot inventory required by D067. Authored documentation, when present, is canonical D062 prose; mechanical presence alone does not create a stability or compatibility promise.

Styling is always enabled.

No callable shape is mechanically recorded for this slot.

Styling follows the caller-supplied automatic decision.

No callable shape is mechanically recorded for this slot.

Styling is never enabled.

No callable shape is mechanically recorded for this slot.

Answers true exactly when value is one of the canonical modes and false for any other value; it never signals an Error. Values are recognized by String identity only, so no behavior of value is invoked.

Answers whether styling is enabled under mode: AUTO answers autoEnabled, ALWAYS answers true, and NEVER answers false. Both arguments are always validated, whatever the mode: mode must be a canonical mode and autoEnabled must be exactly true or false; any other argument signals an Error, and no argument is converted. No environment or terminal is consulted to decide AUTO.

Exact module source · Standard-library API · Standard library overview