Ok my orignal question has changed. How do i change the intensity of how something like this is effected?
DayToNight.setXfermode(new PorterDuffXfermode(Mode.DST_IN));
in my dream world it would have worked like this
DayToNight.setXfermode(new PorterDuffXfermode(Mode.DST_IN(10)));
the 10 being a level of intensity.
An example would be if I had a flickering candle, when the candle burns bright I want the bitmaps I am drawing to the screen to retain their origanol color and brightness, when it flickers I want the bitmaps to be almost blacked out, and I want to darken the Bitmaps as the light dims.
I have equations, timers and all that figured out, just not how to actually apply it to change the color/brightness. Maybe burning the images is what im looking for? I just want to change the lightness lol.
I feel like using paint.setShader might be a solution, but the information in this area is pretty limited from what i have been able to find. Any help would be appreciated.
edit: to be crystal clear, i am looking for a way to lighten/darken bitmaps as I draw them to the canvas