OptiGUI

OptiGUI

7M Downloads

text colours

dadoirie opened this issue · 4 comments

commented

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)

commented

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

commented

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

Сan also use this option for JSON lovers.
image

commented

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)

commented

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