Problem: Users cannot define custom named colors without subclassing or modifying the module.
Why it matters: Branding and user-defined themes require extensibility.
Proposed solution: Accept an optional palette dict in Console.__init__ mapping names to ANSI codes; dynamically create methods (console.myred()) via __getattr__. Validate codes on init.
Notes: Cache dynamic methods; avoid conflicts with built-ins. Document that palette overrides are per-instance only.
Problem: Users cannot define custom named colors without subclassing or modifying the module.
Why it matters: Branding and user-defined themes require extensibility.
Proposed solution: Accept an optional palette dict in
Console.__init__mapping names to ANSI codes; dynamically create methods (console.myred()) via__getattr__. Validate codes on init.Notes: Cache dynamic methods; avoid conflicts with built-ins. Document that palette overrides are per-instance only.