- Home /
Find brightness of certain part of screen
Is it possible to detect the brightness of a certain part of the screen?
In the screen below just below the green bar is a GUI score, also green, so what I want to do is depending on the brightness of that part of the screen alter the GUI score colour from a light colour to a dark colour depending on the brightness of that part of the screen so it becomes more visible, and I have no idea how to go about doing this, is it possible ?
I would think you could write a pixel shader to accomplish this, but it would be easier to just add some contrast. Create a semi-transparent black panel behind the two bars, and then make the bars mostly opaque. I don't think you would have an issue with visibility then.
Your answer
Follow this Question
Related Questions
How do I make a colour editor UI? 1 Answer
Help with text color 1 Answer
GUI Colour based on Health? 1 Answer
Get the main colour of a sprite? 1 Answer