Open Romindous opened 2 months ago
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
;)
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?