Skip to content

feat(core): support ANSI 16 colors for borderColor and backgroundColor#932

Open
seffhunnn wants to merge 1 commit intoanomalyco:mainfrom
seffhunnn:feat/ansi16-border-background-colors
Open

feat(core): support ANSI 16 colors for borderColor and backgroundColor#932
seffhunnn wants to merge 1 commit intoanomalyco:mainfrom
seffhunnn:feat/ansi16-border-background-colors

Conversation

@seffhunnn
Copy link
Copy Markdown

Summary

Preserves ANSI 16 named colors for borderColor and backgroundColor instead of always converting them into truecolor RGB escape sequences.

This allows terminal themes and SSH client palettes to map colors correctly for named colors such as "red", "blue", and "brightCyan".

Changes

  • tagged ANSI named colors with palette metadata in RGBA
  • added ANSI 16 foreground/background helpers
  • updated renderer to prefer ANSI palette escape sequences when available
  • added end-to-end Box rendering tests

Testing

  • bun test src/lib/RGBA.test.ts → 131 passing
  • ⚠️ bun test src/renderables/Box.test.ts requires native binary package (@opentui/core-win32-x64) unavailable locally, expected to run in CI

Closes #852

@seffhunnn
Copy link
Copy Markdown
Author

Added a TypeScript-only fix that preserves ANSI 16 palette metadata through the Box rendering pipeline, with end-to-end tests for named color behavior.

Local TS tests are passing; Box integration verification is expected to complete in CI because native binaries are unavailable locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ANSI 16 color codes for borderColor and backgroundColor

1 participant