Skip to content
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

feat: shadow colors #1124

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

feat: shadow colors #1124

wants to merge 3 commits into from

Conversation

kashike
Copy link
Member

@kashike kashike commented Nov 1, 2024

No description provided.

@kashike kashike linked an issue Nov 1, 2024 that may be closed by this pull request

public interface ShadowColor extends StyleBuilderApplicable {
@Contract(pure = true)
static ShadowColor shadowColor(final int value) {
Copy link
Member

Choose a reason for hiding this comment

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

should document the format of that int
and maybe we can have overloads that take a textcolor + alpha?

@kezz
Copy link
Member

kezz commented Nov 1, 2024

We need a concept of "no shadow" that exists outside of creating a shadow colour with a magic number value. I'm also not sure I like the ShadowColor object existing as it does, I think I'd prefer it to be an interface implemented by either a singleton "none" object or a textcolor + alpha value. As we need some sort of ARGBLike interface (most platforms already have a colour + alpha object), I think we should try and ensure we don't duplicate API here.

Ideally I think the API would allow for all of the following:

style.shadowColor(ShadowColor.NONE);
style.shadowColor(ShadowColor.shadowColor(NamedTextColor.RED, 0.4);
style.shadowColor(NamedTextColor.RED);
style.shadowColor(myBukkitColorObject);
style.shadowColor(ShadowColor.shadowColor(0xRRGGBBAA);

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 support for shadow_color to MiniMessage Add support for shadow_color to Style
3 participants