KyoriPowered / adventure

A user-interface library, formerly known as text, for Minecraft: Java Edition
https://docs.advntr.dev/
MIT License
678 stars 103 forks source link

Add brightness/lightness and a wrap around tag to mini message <rainbow> tag #1038

Open Antritus opened 4 months ago

Antritus commented 4 months ago

Add more tags to the minimessage rainbow tag <rainbow>

This might make the tags too confusing so it's only a suggestion.

Brightness tag would be a double/float to control between blackness and whiteness Brightness 0 = black Brightness 1 = white brightness between 0 and 1 would show different brightness of hex colors

<rainbow:0.5f>This is a rainbow string with 0.5f brightness
<rainbow:0.9f>This is a rainbow string with 0.9f brightness. This would be pretty whitish
<rainbow:0.1>This would be rainbow string with really dark almost black

Wrap around tag would be like the current number tag in rainbow Wrap around would just set the maximum string length between red and purple. This ignores spaces so it doesn't wrap around them This could be possible way to display it..

<rainbow:wrap:10>This tag would split after "u" in the word "would" and redo the rainbow after it 
<rainbow:wrap:5>This tag would split after "t" in "tag"

What combine strings could look like

<rainbow;!5:0.5f:wrap:4> would make it display the rainbow reversed starting from the 5th color, with 0.5f brightness and wrapping every 4 characters
<rainbow;0.5f:wrap:10> would make it display the rainbow with 0.5f brightness and wrapping every 10 characters
<rainbow;!:wrap:7> would make it display the rainbow reversed and wrapping every 4 characters

Most of these ideas are from this "Skript" thread which had them. https://forums.skunity.com/threads/colorutils-1-16-skript-2-6.12134/

upload_2020-12-22_17-16-23

zml2008 commented 4 months ago

I think some more advanced formatting options would be great, but the syntax starts getting pretty complex. I think we'd need to look at adding some sort of named arguments language feature to MM in order to make these sorts of features less convoluted.