Search code examples
androidcolors

Android changing a color's brightness


I want to change the brightness of any given color (Note: I am not talking about screen brightness), I have looked at the Color class, it has a few methods for conversions between RGB and HSV, I'm a newbie in this area. To start with, how do I change the brightness of red, if its value is spefied in RGB (#FF0000)?


Solution

  • For starters, you need to remember two things -

    1. To reduce brightness, you can change red from #FF0000 to #AA0000 or #880000 - basically reduce the Red component.
    2. You can also try reducing opacity - often you'll realize that it works better than just reducing brightness.