Add 24bit color support#43
Merged
buger merged 6 commits intobuger:masterfrom May 22, 2022
different55:RGB
Merged
Conversation
According to the standard, colors 39 and 49 can be used to switch to the terminal default colors for foreground and background respectively. RESET_COLOR now uses 39;49 instead of 32, which only sets the foreground color to green.
Added support for 24bit foreground and background colors with CSI[38;2;<r>;<g>;<b>m and CSI[48;2;<r>;<g>;<b>m through the GetRGBColor() and GetBgRGBColor() functions.
Oh holy crap I didn't realize getColor and getBgColor weren't exported. Seems a little weird but here I'll add ColorRGB and BackgroundRGB to format strings in 24bit color.
You know what how about we just export these, is there any reason to enforce wrapping it around a string line by line? I can't think of any reason to not allow the user to handle it.
Since the ColorRGB and BackgroundRGB functions have the RGB as a suffix we should probably do the same for the GetRGBColor functions as well.
Missed a spot.
Owner
|
Nice! Looks cool! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Very old, don't know if this is wanted or good anymore but I'm going through all my repositories and making pull requests for the stuff I apparently never did. Can redo or touch up anything needed, just let me know!