fix: complete pyte-to-Rich color mapping

Audited all color names from both libraries and added complete mappings:

pyte standard ANSI:
- brown -> yellow (pyte uses 'brown' for ANSI color 33)

pyte bright/AIXTERM colors:
- brightblack -> bright_black
- brightred -> bright_red
- brightgreen -> bright_green
- brightbrown -> bright_yellow
- brightblue -> bright_blue
- brightmagenta -> bright_magenta
- bfightmagenta -> bright_magenta (typo in pyte's BG_AIXTERM)
- brightcyan -> bright_cyan
- brightwhite -> bright_white

Also handles hex colors from 256-color and truecolor modes
by adding '#' prefix (e.g., 'ff8700' -> '#ff8700').

Bumps version to 0.1.15.
This commit is contained in:
GitHub Copilot
2026-01-24 11:23:01 +00:00
parent 0d53952ff7
commit 0cae07cba6
2 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual-webterm"
version = "0.1.14"
version = "0.1.15"
description = "Serve terminal sessions over the web"
authors = ["Will McGugan <will@textualize.io>"]
license = "MIT"