The following code, executed on some machines of our company, throws an IllegalArgumentException :
Color sludge = new Color(133, 133, 78); //throws IAE with message "Color parameter outside of expected range: Red Green Blue"
Instead, an equivalent call works using float arguments:
Color sludge = new Color(0.522, 0.522, 0.306);
Why could this be so? And why does this only affect certain machines?
Perhaps this is due to the fact that these Color objects are defined in Spring as follows:
<bean id="sludge" class="java.awt.Color"> <constructor-arg value="133"/> <constructor-arg value="133"/> <constructor-arg value="78"/> </bean>
source share