Implement Bright Foreground Colors.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at the linked Color.cpp location and trace how _COLOR_BRIGHT, _COLOR_FG, and _COLOR_BG are defined and used. Separate the foreground-bright and background-bright flags, then verify that ANSI output can select the upper eight foreground colors without relying on inverse, bright, and bold background/foreground combinations.
Written by the indexing model from the issue text.
Description
The _COLOR_BRIGHT flag should be separated into _COLOR_FGBRIGHT and _COLOR_BGBRIGHT to allow accessing the upper 8 colors in ANSI mode. Particularly this allows access to bright and bold colors.
The output coding currently as: https://github.com/GothenburgBitFactory/libshared/blob/ba9b76db8f6180dc62f0bdbdd012891d818108e8/src/Color.cpp#L487 would then be changed to:
result += colorstring[((_value & _COLOR_FGBRIGHT ? 89 : 29) + (_value & _COLOR_FG))];
Currently it's possible to trick the existing code into giving bright and bold colors by requesting inverse bright bold <background> on <foreground> but this is really quite ugly.
- Dominant language
- C++
- Stars
- 7
- Forks
- 30
- Avg merge
- 13h 17m
- Merged PRs (30d)
- 1
Contributor guide
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.
More from GothenburgBitFactory/libshared
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
GothenburgBitFactory/libshared#112 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
GothenburgBitFactory/libshared#77 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
GothenburgBitFactory/libshared#49 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in GothenburgBitFactory/libshared
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·