How to use this Color's constructor? Java
- by MaxMackie
According to Oracle's site, the class Color has a constructor that accepts a single int value which represents an RGB value. http://download.oracle.com/javase/1.4.2/docs/api/java/awt/Color.html#Color(int)
An RGB color is actually three different numbers ranging from 0-255. So combining them together to make one int would look like this:
White 255,255,255
White 255255255
Right? So I pass this to the constructor and get a vibrant teal color. What am I doing wrong? What haven't I understood?