LibrarianLib

LibrarianLib

18M Downloads

InterpColorComponents missing color value check

GlassSpirit opened this issue ยท 2 comments

commented

InterpColorComponents is missing color value check.
For example if I want to set color function based on InterpColorComponents(Color.BLACK, Color.WHITE), it throws exception java.lang.IllegalArgumentException: Color parameter outside of expected range: Red Green Blue and crashes

commented

Guess it is because constructor of java.awt.Color that takes float values multiplies them by 255, so in InterpColorComponents you should cast parameters to integer before passing them to Color constructor

commented

Derp on my part. Yeah that would be why.