VEX IQ Python API
Public Member Functions | Static Public Attributes | List of all members
vexiq.NamedColor Class Reference

Enumeration of named colors (for TouchLed and ColorSensor) More...

Public Member Functions

def get_color (named_color)
 Get (red, green, blue, brightness) tuple for the named color. More...
 
def get_name (named_color)
 Get the name of the named color. More...
 

Static Public Attributes

int OFF = 0
 
int RED = 1
 
int RED_ORANGE = 2
 
int ORANGE = 3
 
int YELLOW_ORANGE = 4
 
int YELLOW = 5
 
int YELLOW_GREEN = 6
 
int GREEN = 7
 
int BLUE_GREEN = 8
 
int BLUE = 9
 
int BLUE_VIOLET = 10
 
int VIOLET = 11
 
int RED_VIOLET = 12
 
int WHITE = 13
 

Detailed Description

Enumeration of named colors (for TouchLed and ColorSensor)

Member Function Documentation

◆ get_color()

def vexiq.NamedColor.get_color (   named_color)

Get (red, green, blue, brightness) tuple for the named color.

Parameters
named_colorNamedColor enum value (number)
Returns
tuple with rgba values for the color

◆ get_name()

def vexiq.NamedColor.get_name (   named_color)

Get the name of the named color.

Parameters
named_colorNamedColor enum value (number)
Returns
string with the color name

Member Data Documentation

◆ OFF

int vexiq.NamedColor.OFF = 0
static

◆ RED

int vexiq.NamedColor.RED = 1
static

◆ RED_ORANGE

int vexiq.NamedColor.RED_ORANGE = 2
static

◆ ORANGE

int vexiq.NamedColor.ORANGE = 3
static

◆ YELLOW_ORANGE

int vexiq.NamedColor.YELLOW_ORANGE = 4
static

◆ YELLOW

int vexiq.NamedColor.YELLOW = 5
static

◆ YELLOW_GREEN

int vexiq.NamedColor.YELLOW_GREEN = 6
static

◆ GREEN

int vexiq.NamedColor.GREEN = 7
static

◆ BLUE_GREEN

int vexiq.NamedColor.BLUE_GREEN = 8
static

◆ BLUE

int vexiq.NamedColor.BLUE = 9
static

◆ BLUE_VIOLET

int vexiq.NamedColor.BLUE_VIOLET = 10
static

◆ VIOLET

int vexiq.NamedColor.VIOLET = 11
static

◆ RED_VIOLET

int vexiq.NamedColor.RED_VIOLET = 12
static

◆ WHITE

int vexiq.NamedColor.WHITE = 13
static