Package lejos.robotics
Class Color
- java.lang.Object
-
- lejos.robotics.Color
-
public class Color extends java.lang.ObjectRepresentation of a color, used by color sensors and color detectors.
-
-
Field Summary
Fields Modifier and Type Field Description static intBLACKstatic intBLUEstatic intBROWNstatic intCYANstatic intDARK_GRAYstatic intGRAYstatic intGREENstatic intLIGHT_GRAYstatic intMAGENTAstatic intNONEstatic intORANGEstatic intPINKstatic intREDstatic intWHITEstatic intYELLOW
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBlue()Returns the blue component in the range 0-255 in the default sRGB space.intgetColor()intgetGreen()Returns the green component in the range 0-255 in the default sRGB space.intgetRed()Returns the red component in the range 0-255 in the default sRGB space.
-
-
-
Field Detail
-
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
-
BROWN
public static final int BROWN
- See Also:
- Constant Field Values
-
NONE
public static final int NONE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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()
-
-