Skip to content

feature(minimessage): Rainbow tag saturation argument #1210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main/4
Choose a base branch
from

Conversation

Privatech38
Copy link

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
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