Skip to content
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

Color math to get terminal colors from color(RGB) #1282

Open
LadyCailin opened this issue May 31, 2021 · 1 comment
Open

Color math to get terminal colors from color(RGB) #1282

LadyCailin opened this issue May 31, 2021 · 1 comment
Labels
feature request New functionality that doesn't exist yet

Comments

@LadyCailin
Copy link
Member

Currently, when doing color() with an RGB value, this is simply stripped from the output. However, we should be able to do some color math to find the closest applicable terminal color, and use that instead, or at minimum translate well defined colors such as #ff0000 to "red".

See #1246 for further information, and the original PR that added this feature.

@LadyCailin LadyCailin added the feature request New functionality that doesn't exist yet label Jun 1, 2021
@PseudoKnight
Copy link
Contributor

Apparently Spigot already translates their hex code format to terminal colors when using sendMessage for ConsoleCommandSender. So we could change Static.SendMessage to use that, as long as we make sure to support use-colors in Preferences, as you said. This wouldn't add full color support to cmdline, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New functionality that doesn't exist yet
Projects
None yet
Development

No branches or pull requests

2 participants