public class Font extends Object implements Serializable
Font f = new Font(String fontName, int fontStyle, int fontSize);
public class Color extends Object implements Paint, Serializable
Color c = new Color(int red, int green, int blue);
HSB Model: Hue, Saturation and Brightness forms the HSB Model. Color Constructor will be passed with the values ranging between 0.0f and 1.0f. If the value is not between the range, IllegalArgumentException is thrown.
Syntax: Color c = new Color(float red, float green, float blue);
Color | Red | Green | Blue | Hue | Saturation | Brightness |
---|---|---|---|---|---|---|
Black | 0 | 0 | 0 | 0 | 0 | 0 |
Blue | 0 | 0 | 255 | .666667 | 1 | 1 |
Cyan | 0 | 255 | 255 | .5 | 1 | 1 |
Green | 0 | 255 | 0 | .333333 | 1 | 1 |
Orange | 255 | 200 | 0 | .130719 | 1 | 1 |
Pink | 255 | 175 | 175 | 0 | 1 | 1 |
Red | 255 | 0 | 0 | 0 | 1 | 1 |
White | 255 | 255 | 255 | 0 | 0 | 1 |
Yellow | 255 | 255 | 0 | .166667 | 1 | 1 |