Skip to content

feature(minimessage): Rainbow tag saturation argument#1210

Open
Privatech38 wants to merge 5 commits intoPaperMC:main/4from
Privatech38:rainbow-tag-saturation
Open

feature(minimessage): Rainbow tag saturation argument#1210
Privatech38 wants to merge 5 commits intoPaperMC:main/4from
Privatech38:rainbow-tag-saturation

Conversation

@Privatech38
Copy link
Contributor

Added a saturation argument (optional) to rainbow tag. It simply sets the saturation value of each HSVLike to the argument value or 1 if omited.

Why? Max saturation can be unpleasant for eyes, especially on longer texts.

The syntax would follow <rainbow:[!][phase]:[saturation]>.

Since the current algortihm has default values if argument is of lenght 0 this allows for such syntax:

  • <rainbow:0:0.65>
  • <rainbow::0.65>

It also uses Float#parseFloat method meaning any legal Java float representation is allowed: .65, 0.65f, 1 etc.

This PR also partially closes #1038

Copy link
Member

@kezz kezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - needs an associated docs PR before merge. Thanks!

@Privatech38
Copy link
Contributor Author

KyoriPowered/adventure-docs#210 documentation PR

@Privatech38 Privatech38 changed the title Rainbow tag saturation argument feature(minimessage): Rainbow tag saturation argument Apr 21, 2025
@kezz kezz modified the milestones: 4.21.0, 4.22.0 Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants