lejos.robotics
Class Color
java.lang.Object
lejos.robotics.Color
- Direct Known Subclasses:
- ColorSensor.Color
public class Color
- extends java.lang.Object
Representation of a color, used by color sensors and color detectors.
Constructor Summary |
Color(int red,
int green,
int blue)
|
Color(int red,
int green,
int blue,
int color)
|
Method Summary |
int |
getBlue()
Returns the blue component in the range 0-255 in the default sRGB space. |
int |
getColor()
|
int |
getGreen()
Returns the green component in the range 0-255 in the default sRGB space. |
int |
getRed()
Returns the red component in the range 0-255 in the default sRGB space. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RED
public static final int RED
- See Also:
- Constant Field Values
GREEN
public static final int GREEN
- See Also:
- Constant Field Values
BLUE
public static final int BLUE
- See Also:
- Constant Field Values
YELLOW
public static final int YELLOW
- See Also:
- Constant Field Values
MAGENTA
public static final int MAGENTA
- See Also:
- Constant Field Values
ORANGE
public static final int ORANGE
- See Also:
- Constant Field Values
WHITE
public static final int WHITE
- See Also:
- Constant Field Values
BLACK
public static final int BLACK
- See Also:
- Constant Field Values
PINK
public static final int PINK
- See Also:
- Constant Field Values
GRAY
public static final int GRAY
- See Also:
- Constant Field Values
LIGHT_GRAY
public static final int LIGHT_GRAY
- See Also:
- Constant Field Values
DARK_GRAY
public static final int DARK_GRAY
- See Also:
- Constant Field Values
CYAN
public static final int CYAN
- See Also:
- Constant Field Values
NONE
public static final int NONE
- See Also:
- Constant Field Values
Color
public Color(int red,
int green,
int blue)
Color
public Color(int red,
int green,
int blue,
int color)
getRed
public int getRed()
- Returns the red component in the range 0-255 in the default sRGB space.
- Returns:
- the red component.
getGreen
public int getGreen()
- Returns the green component in the range 0-255 in the default sRGB space.
- Returns:
- the green component.
getBlue
public int getBlue()
- Returns the blue component in the range 0-255 in the default sRGB space.
- Returns:
- the blue component.
getColor
public int getColor()