1 | Color c = new Color (redvalue, greenvalue, bluevalue); // red/green/bluevalue can be specified as integers in 0.....255 or floating point numbers from 0 to 1. |
2 | c is generated as a Color in RGB format. |
3 | graphicsobject.setColor(c); // sets current color in graphicsobject which is used for all subsequent operations |
4 | graphicsobject.setFont(particularFont); // similarily sets font hereafter as on previous page |
5 | There are particular Color instances already defined such as |
6 | Color.white equivalent to Color(255,255,255) |
7 | Color.black as equivalent to Color(0,0,0) |
8 | Color.pink as equivalent to Color(255,175,175) |