prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Support terminal output color indexes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Currently _color_to_code implements sophisticated support for vt100 terminal colors:
- Ansi names.
- 16 colors.
- 256 colors.
- True color.
What is missing is the possibility to directly pass the code. This is important since some people (like me, using base16 themes) customize the first 16 colors to their heart contents. I believe it's a very simple change: if color is an int simply return it as a code.
What do you think?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the _color_to_code implementation and read its existing handling for named, 16-color, 256-color, and true-color values. Confirm the surrounding terminal color tests or entry points, then verify that direct integer color codes are accepted without changing existing conversions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100