Represents a color with red, green, and blue components. This class does not provide transparency
since it is not to be used for that purpose.
public final class RGB
Field Summary
| Modifier and Type | Field and Description |
|---|---|
public | bRepresents the blue component of the color represented by this RGB instance. |
public | gRepresents the green component of the color represented by this RGB instance. |
public | rRepresents the red component of the color represented by this RGB instance. |
Constructor Summary
| Modifier and Type | Constructor and Description |
|---|---|
public | RGB(float cr, float cg, float cb) Creates a new RGB using the give red, green and blue components. |
public | RGB(String rgb) Creates a new RGB using the color's string representation. |
Method Summary
Methods inherited from java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitField Detail
| b |
|---|
public b Represents the blue component of the color represented by this RGB instance. |
| g |
|---|
public g Represents the green component of the color represented by this RGB instance. |
| r |
|---|
public r Represents the red component of the color represented by this RGB instance. |
Constructor Detail
| RGB | ||||||
|---|---|---|---|---|---|---|
public RGB(
float cr,
float cg,
float cb
)Creates a new RGB using the give red, green and blue components.Parameters:
|
| RGB | ||
|---|---|---|
public RGB(
String rgb
)Creates a new RGB using the color's string representation.Parameters:
|