You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Color math to get terminal colors from color(RGB) #1282
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.
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.
Activity
PseudoKnight commentedon Feb 25, 2022
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-colorsin Preferences, as you said. This wouldn't add full color support to cmdline, though.