§R7.1 Detection Algorithm

Applications MUST detect color capability at startup using this priority order:

1. If COLORTERM == "truecolor" or COLORTERM == "24bit":
     → Truecolor (24-bit, 16.7M colors)
2. Else if TERM contains "256color":
     → 256-color mode
3. Else if TERM == "dumb":
     → Monochrome (attributes only: bold, dim, underline, reverse)
4. Else:
     → 16-color ANSI (standard + bright)

§R7.2 Graceful Degradation

FeatureTruecolor256-color16-colorMonochrome
Semantic roles (§R3.2)Exact hexNearest 256 indexNearest ANSIN/A
Status colors (§R3.3)Exact hexNearest 256 indexStandard red/green/yellowBold/dim/reverse
Elevation shadowsDim + colorDim + index 240Dim (SGR 2)Reverse video strip
Scrim (Level 4)Semi-transparent dimDim all bg cellsDim all bg cellsReverse video border
TypographyFull SGRFull SGRFull SGRBold, dim, reverse only