-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
base: main/4
Are you sure you want to change the base?
feat: shadow colors #1124
Conversation
|
||
public interface ShadowColor extends StyleBuilderApplicable { | ||
@Contract(pure = true) | ||
static ShadowColor shadowColor(final int value) { |
There was a problem hiding this comment.
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?
api/src/main/java/net/kyori/adventure/text/format/ShadowColor.java
Outdated
Show resolved
Hide resolved
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); |
No description provided.