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 ;)
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)
![image](https://private-user-images.githubusercontent.com/64203160/358856971-ca190d47-01e4-41cc-b76b-148244532381.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDYyNzEsIm5iZiI6MTcyNjE0NTk3MSwicGF0aCI6Ii82NDIwMzE2MC8zNTg4NTY5NzEtY2ExOTBkNDctMDFlNC00MWNjLWI3NmItMTQ4MjQ0NTMyMzgxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDEyNTkzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiNmYzYjk4MmNjOGJiZTYwYjA1NGZhMzZkOTMxYmI5NzUxMDVlYTViOWUzZTU3MmE5ZDYzNGI4YWEzZTgwZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.v-7KKHsBzWtKQVLulZot0Y8TWowMRRAnU9Ct7Ozpe9E)
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)
![image](https://private-user-images.githubusercontent.com/64203160/358857035-1895f87f-b68a-4b94-a9d9-64c6418bf7fd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNDYyNzEsIm5iZiI6MTcyNjE0NTk3MSwicGF0aCI6Ii82NDIwMzE2MC8zNTg4NTcwMzUtMTg5NWY4N2YtYjY4YS00Yjk0LWE5ZDktNjRjNjQxOGJmN2ZkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDEyNTkzMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc4MTdlMWE1M2ZmNGRkNGU0NWUxNGU1MDlhMGNjYTk1ZmE0MTRiNGFmZWE3YTRmNDYyYjNlMjMyZDY4ODFiOWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.juh9HAow4u63c9-j_I5eUmRy7lFjopZJTf7l7QBZPIE)
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: