Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ansii color codes with the formatter #33

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

gbm25
Copy link
Member

@gbm25 gbm25 commented Dec 17, 2023

Closes #28

Text strings with ANSII code have been replaced by our stylizer in the test suite.
I also replaced the sstdout with our print() and printl() functions, which internally use the formatter.

The colors we were using for the stylizerwere a bit limited, and were not giving me the results I wanted (they were too bright).
After some research, it was because they belonged to the extended palette of 256 colors (which I didn't know when I created the stylizer).
To solve it I slightly modified the stylizer to recognize if it was a standard ANSII color or part of the extended palette, and in the process I added more colors and a better organization of them to make it easier to add more in the future if necessary.

More colors have been added to the enum, as well as improved organization to make it easier to add more if needed in a structured way.
Add support for standard ANSI colors and extended 256-color palette in the stylize function. Implement logic to distinguish between standard ANSI color codes and extended color codes for precise text styling in terminal output. This enhancement allows for a broader range of color customizations, improving the readability and visual appeal of terminal text.
Replaced ANSII codes with our 'stylizer', and removed std::cout in favor of print and println.
@gbm25 gbm25 added the enhancement New feature or request label Dec 17, 2023
@gbm25 gbm25 self-assigned this Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace ANSII color codes with the formatter
1 participant