szn

Bug 383 — Bright colours encoded in the wrong namespace

383. brightgreen renders pale cyan in the status bar

File: src/colour.zig:124-129 (consumed by status.zig appendSgr paths) Severity: MEDIUM Status: ✅ FIXED

Fix (applied)

Bright colour names now map to aixterm palette slots 8–15 (index + 8), which writeSgr emits as \x1b[38;5;10m etc. and every modern terminal renders from its bright palette. The old +90 value only worked as a direct SGR parameter, never as a 38;5 index. No other code path used the +90 encoding.

Test: the previously wrong-value test now asserts slot 10, the emitted SGR sequence, and the RGB fallback resolving to true bright green (00ff00).

Problem

return if (entry.is_bright) Colour.fromIndexed(entry.index + 90) else Colour.fromIndexed(entry.index);

SGR 90–97/100–107 are attribute codes, not palette indices. Encoding them as 38;5;92 selects a completely different colour from the 256-palette cube. A unit test at colour.zig:286 currently cements the wrong value.

Fix (proposed)

Represent bright variants as palette indices 8–15 internally and map to SGR 90-97 at emit time (when the terminal honours them), or emit \x1b[1m + base colour. Update the test to assert the emitted sequence.