-
Notifications
You must be signed in to change notification settings - Fork 1
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
True color #2
base: feature/true-color-support
Are you sure you want to change the base?
True color #2
Conversation
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: |
@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. |
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
develop
into 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)^2
But 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).