-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Dynamic ProgressComponent text color #1123
Conversation
Sorry I've never contributed to Minecraft mods. |
No worries. In |
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.
Hopefully last thing.
src/main/java/de/hysky/skyblocker/skyblock/tabhud/widget/component/ProgressComponent.java
Outdated
Show resolved
Hide resolved
Hopefully, if I have to write one more Java line I'm gonna age 50 years :) Anyway I think it looks good now, a hint from my testing (only comms, not farming or anything): Only the beginning red color actually matches a bright text color, so it could be even more simplyfied by just changing to black when the bar reaches the end of the text, regardless of the color brightness. However I think this solution is a lot better if you use this component in multiple places with different color values, or if you ever change the color by progress calculation. |
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.
Looks good, thanks!
Applies a better text color depending on the bar color.
For example while doing comms the bars may be yellow and the text is hard to read because it's tinted white.
Now the text color is black when the bar is bright and white otherwise.