-
Notifications
You must be signed in to change notification settings - Fork 621
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
Arbitrary RGB color support #131
Comments
Let me know what you think, @fatih! |
Can we please have orange? @fatih |
This library can make it easy to implement: https://github.com/jwalton/gchalk (it also auto-detects terminal support levels) I can make a PR that uses this library, but I'm not sure whether @fatih would be okay with using another color library. |
I like the idea. @quackduck can you write how you want to tackle this? Do you plan to introduce a new API? or just change the underlying implementation? Before we go down this road, I want to first understand what the implications are, and whether it's worth adding it, and if we add, how I want to add it (I don't want to break existing code, because use the color package now for years based on the assumption that it uses ANSI escape codes). |
I think a new API would probably be the best way to do this since changing the underlying implementation could break stuff. Not sure if I can make a PR in the near future, though. |
24-bit true color with ANSI escape sequences can be used for encoding arbitrary colors. Refer:https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797. |
@Kevin-Rudy thanks for the tip. It never occurred to me to use the RGB colors that way, but this is nice. We could easily document this in our README, and I'll think if we can simplify it to some new functions, i.e: |
Hey Fatih, is there any way I can help with implementing this new API? I think it can be very useful considering how widely used this package is 👍🏼 |
Hi @bschaatsbergen I created a PR, could you try it out and share any feedback you have? Thank you: #225 |
I merged RGB support via: #225 I'll release a new version soon, but you can go get the |
Can we add truecolor support? The ability to specify any R, G and B value?
The text was updated successfully, but these errors were encountered: