When an animation is monochrome, it's pixels can be colored in a randomly chosen color, to make everything more colorful (using the -c argument). However, the color that is used to overwrite isn't adjusting to the brightness of the given color within the frame. Right now it's flat overwriting the same color to all pixels, that just aren't black. The a solution would be, to calculate the brightness of the pixel and applying that to the random color for this pixel. Use the method getLuminance() for that.
When an animation is monochrome, it's pixels can be colored in a randomly chosen color, to make everything more colorful (using the
-c
argument). However, the color that is used to overwrite isn't adjusting to the brightness of the given color within the frame. Right now it's flat overwriting the same color to all pixels, that just aren't black. The a solution would be, to calculate the brightness of the pixel and applying that to the random color for this pixel. Use the methodgetLuminance()
for that.