Buuz135 / DarkModeEverywhere

MIT License
7 stars 9 forks source link

Suggestion: Dark Mode With Colour-Based Whitelist #47

Open IdrisQe opened 5 months ago

IdrisQe commented 5 months ago

So, this is a bit of an off-the-wall suggestion, but I think there's a potential use-case for it. I have no idea how difficult this would be to implement, but... one of the main reasons people use dark mode GUIs as far as I can tell is that the default Minecraft UI's grey is so bright and bland. But that could actually work as an advantage for configurability.

I've seen people complaining about UIs they didn't want darkened getting darkened (such as the vanilla recipe book, some modded UIs, etc.) and what most of those have in common is that the parts people don't want darkened aren't using the fairly standardized "Minecraft UI Grey".

So what if there was a mode where certain colours could be whitelisted, and only those colours would be affected by the shader? So modded UIs that make use of Minecraft's standard colours (I'd say most of them, that is) would be darkened, while anything that isn't those specific colours would be left alone (including pieces of GUIs that have other parts being darkened)

Or people could set up their own whitelists to darken of a particular set of colours (If a mod does use custom UI colours for their containers or interfaces, it will usually stick to a specific pallette anyway)

Again this could be absurdly difficult to implement, I have zero shader experience whatsoever, so if this is a terrible or unfeasible idea feel free to close this!

Lordfirespeed commented 1 month ago

What you are describing would best be achieved with a dark mode texture pack - detecting the colour of a UI element is not practically achievable. Essentially the mod would have to render a 'screenshot' of the GUI and calculate statistics of pixel colour frequency, variance etc. It would be wasteful to do this every frame, so it would probably be done only once - and then there's the possibility that the GUI changes colour during its lifetime, which isn't something that can be practically detected.