Open
Conversation
added 5 commits
December 4, 2022 10:12
Author
|
Update: Ok I think HSV for mapping is not working out so well and RGB just works better. have removed it in For reference here is a comparison: |
Author
|
@veeman are you still interested in working on true color support and trying to get your feature branch If so then please let me know how you feel about the changes in this PR to that feature. If not then I can retarget this at the main Terminal.Gui repo as a new PR and work on it there. |
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.

Hey, I've done a bit of work on true color. Changes include
One thing is that if true color is enabled in Driver then the true color RGB values are always used. This means that if different OS/console map the console colors to different RGB that difference will not be apparent. Worth discussing further anyway.
I have merged
developinto my branch so you should see an easier to read diff if you sync your branch.I think some more work can be done on the mapping. I did start with just
distance = (R1-R2)^2 + (G1-G2)^2 + (B1-B2)^2But this seemed to be a bit meh so I experimented with HSL distance instead. But Hue for black/grey/white are undefined which makes it a bigger pain.
The current algorithm pushes anything that's not 100% black to a color so I will have to tinker and try to fix that.
The PR adds a dependency to UICatalog only (not the main library) on ImageSharp which is the de-facto standard imaging library for .net (as well as the one that Spectre.Console are wrapping for imaging work).