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
So, as it stands, there is a set number of named colors that are recognized by adventure, and are used by minimessage. One can "add" more colors by using a TagResolver, which should substitute a hex code when reading the tag name (1st image)
However, the problem shows when the new color isn't in a simple form, such as by using a gradient, where the name is simply not recognized (2nd image)
Could we maybe get a way to straight up add NamedTextColors? Maybe some way to register them in minimessage?
The text was updated successfully, but these errors were encountered:
NamedTextColor is global state (essentially an enum) and probably not a good idea to modify, custom colors should only exist within the lifetime of the MiniMessage instance they are attached to. If you just want to create your own TextColor enums, you can accomplish this with a class in your own namespace.
This could maybe look like builder().color("name", /* TextColor instance */) with perhaps helper methods for hex codes/RGB int literals
Watching this in case I have to implement it in minimessage-js ;)
Coming back to this, I think it'd be pretty neat to have a custom colour registry as part of the parse context -- but it does raise concerns about splitting the format, where one plugin supports colours that others don't. Maybe include some way to have a global colour registry? maybe as a platform service?
So, as it stands, there is a set number of named colors that are recognized by adventure, and are used by minimessage. One can "add" more colors by using a TagResolver, which should substitute a hex code when reading the tag name (1st image)
However, the problem shows when the new color isn't in a simple form, such as by using a gradient, where the name is simply not recognized (2nd image)
Could we maybe get a way to straight up add NamedTextColors? Maybe some way to register them in minimessage?
The text was updated successfully, but these errors were encountered: