-
Notifications
You must be signed in to change notification settings - Fork 695
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
Add support FullColor (24bit) for Windows #103
Conversation
Add FullColor class. Add GetCode(color) and GetColor(code) methods. Add FullAttribute
Add WriteConsole form kernel32. Add FullWriteConsole. Change OutputBuffer in WindowsDriver. Change WriteToConsole (work in 4bit and 24bit situatoin) SetSupportFullColor DON'T IMPLEMENT
Add FullColor element to example. Fix setAttribute
Thanks for the contribution! I am currently on vacation, with limited time to review, but I think this looks good. I will take some code, but I suspect that this might force me to finally revisit the color allocation code, and come up with something better. |
Change FullColor to TrueColor. Change Windwos and Linux code to code4 and code8. Expand Attribute, remove FullAtribute. Back to struct Attibute. Add ConsoleModes (remove "| 7"). Fix cursor position after WriteConsole. Implement SetSupportTrueColor. Fix small tab
I rewrote some part of code. I removed FullAttribute and back to struct Attibute and expanded Attribute (it's strange, but I more time didn't see easy way). Refactored code, restored cursor position after ConsoleWrite. And I tried implement TrueColor support detection. |
@@ -10,6 +10,7 @@ | |||
using Mono.Terminal; | |||
using NStack; | |||
using Unix.Terminal; | |||
using System.Drawing; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System.Drawing will be problematic, I would rather avoid bringing another assembly dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I forgot remove it. Now, System.Drawing not used
This looks great. I will check after this 0.16 bug fix releease |
Is this a PR that we should take? Is this still valid? |
@migueldeicaza - please comment on this PR. Should we pursue it or abandon? |
I'm closing this PR as it is quite stale. |
Pretty sad, that this was abandoned! |
I agree. It would be awesome if someone took it on. The tracking issue is here: #48 |
@tig What do you think? How complicated would it be to re-implement this pull request into the current state of development? |
I add api for support 24bit color and 8bit color(256 color). Change struct Attribute to class Attribute and add class FullAttibute : Attribute. Add FullColor class (just r-g-b) and static method to convert 24bit color ←→ 8bit color (Linux-like) ←→ 4bit color (Old-windows-like).
Change WindowsDriver implementation for support 24bit color.
But i can't implement checking windows version (old verson don't support 24bit color). I tried to use registry, but .Net Core don't support it. (see SetSupportFullColor() in WindowsConsole)
Change background of Box10x in example.