-
Notifications
You must be signed in to change notification settings - Fork 696
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
Fixes #2797 - Refactor Color/TrueColor - Make TrueColor default #2896
Merged
Conversation
This file contains 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
tig
changed the title
Fixes #2797 - Refactor Color/True Color - Make TrueColor default
Fixes #2797 - Refactor Color/TrueColor - Make TrueColor default
Oct 10, 2023
I think this is ready! |
16 tasks
tznind
approved these changes
Oct 13, 2023
Awesome work! I have left a few comments, nothing major. |
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.
Fixes #2797 - Refactor Color/True Color - Make TrueColor default
Partial fix for #457 -
Plan
Color
becomes a class that represents a 32-bit color value accessible viaR
,G
, andB
properties (there will be an un-usedA
property as well given that most color systems include an alpha channel, even though there's no standard for that in most terminals).Color
will have properties for each of the 16 legacy color names (in the currentColor
enum). This enables most existing app code that usesColor.White
etc... to work.Color
will provide a way to convert between legacy-16-color colors and 24-bit colors (Value
will return(this.A<< 24) | (this.R<< 16) | (this.G<< 8) | tc.B
).Attribute
will revert to looking more like it did in v1 with just aForeground
andBackground
property (theTrueColorForeground/Background
properties will be removed.Attribute.Make
- usenew
instead.Attribute.Get
- Was only used in one unit testDriver.GetColors
- not needed anymoreHasValidColors
stuff - With TrueColor and the map of color names to RGB values now inColor
, it's not needed.Initalized
stuff - With TrueColor and the map of color names to RGB values now inColor
, it's not needed.TrueColor should be the default; fallback to 16 color mode would be automatic if possible.
Persistence of colors to ConfigurationManager needs to be sorted out.
#RGB
,#RRGGBB
,#RGBA
,#RRGGBBAA
,rgb(r,g,b)
,rgb(r,g,b,a)
, or aColorName
.Color.Colors
👍Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)