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

text colours #70

Open
dadoirie opened this issue Aug 30, 2023 · 4 comments
Open

text colours #70

dadoirie opened this issue Aug 30, 2023 · 4 comments

Comments

@dadoirie
Copy link

Functionality of changing text color with RGBA or/and HEX
As an example I'll use an dilemma I'm currently facing and really wanna add a background behind the container title - I'm working on 2 versions of a GUI (dark mode and vanilla) and changing the text color with core shaders which works pretty well in all containers - in this case shulker boxes - except black shulker boxes on vanilla GUI (hard to read the black text on black background) and white shulker boxes in dark mode (white text on white background)
vanilla-black
dark-white

now this is how the opposite shulker boxes look and how the text color actually should be - black shulker boxes in dark mode just goes perfectly as it is white-ish on black - same goes with white shulker boxes in vanilla GUI
dark-black
vanilla-white

having the possibility to change text color in selected containers would pretty much resolve this (I personally would prefer RGBA, because core shaders do use vec4 - which is RGBA / 255 and easier to make the transparency with just numbers - especially if using a config for the resourcepack with a slider from 0 to 100 * 255 (or 0 to 100 / 100 if its for vec4) for transparency)

@opekope2
Copy link
Owner

Something like this is planned in a future release. Until then, the way I changed the text color is overriding the key in the language JSON and use formatting codes (which changes the color for every texture, because it's rendered on top of it, and probably isn't helpful).
My idea is that a text format can be specified optionally for each texture (one option is to insert a format code in front, changing the entire text)

@dadoirie
Copy link
Author

somebody else on discord also suggested the language strings and formatting codes, and that changes every - in this case - shulker box which is not what I'm having the issue with. Also changing text color with vanilla core shaders is more practical and easier to maintain - no need to change every language file
Your idea for future release will work nicely too - I just wished to fine tune it more and that's why I suggested supporting RGBA text coloring for each texture independently as it allows for more flexibility

slightly related note in combination with #69 : this also could be used with the linked storage color code combinations - OptiGUI just gotta know which color combination is currently open and if it is a private or public chest

@YoungSoulluoS
Copy link
Contributor

YoungSoulluoS commented Mar 20, 2024

how about this? It's already done, I'll offer it to PR soon
image

Сan also use this option for JSON lovers.
image

@opekope2
Copy link
Owner

I'll fix this in OptiGUI 2.4.0 after releasing a stable 2.3.0. For real now. I need a couple of months for that. Thanks for your patience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants