VEX V5 Python API
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
vex.Color Class Reference

Public Member Functions

def __init__ (self, color_value)
 Creates a color using a 0xRRGGBB color value. More...
 
def set_rgb (self, r, g, b)
 
def set_value (self, color_value)
 
def set_hsv (self, hue, saturation, value)
 Creates a color using hue, saturation, and brightness values. More...
 
def set_web (self, web_color_str)
 
def value (self)
 Gets the 0xRRGGBB color value. More...
 
def is_transparent (self)
 Gets the state of the color's transparency. More...
 

Static Public Member Functions

def from_rgb (r, g, b)
 
def from_hsv (h, s, v)
 
def from_web (web_color_str)
 

Static Public Attributes

 BLACK = None
 
 WHITE = None
 
 RED = None
 
 GREEN = None
 
 BLUE = None
 
 YELLOW = None
 
 ORANGE = None
 
 PURPLE = None
 
 CYAN = None
 
 TRANSPARENT = None
 

Constructor & Destructor Documentation

◆ __init__()

def vex.Color.__init__ (   self,
  color_value 
)

Creates a color using a 0xRRGGBB color value.

Member Function Documentation

◆ set_rgb()

def vex.Color.set_rgb (   self,
  r,
  g,
  b 
)

◆ set_value()

def vex.Color.set_value (   self,
  color_value 
)

◆ set_hsv()

def vex.Color.set_hsv (   self,
  hue,
  saturation,
  value 
)

Creates a color using hue, saturation, and brightness values.

Parameters
hueAn integer from 0 to 360 that represents the hue of the color.
saturationA double from 0.0 to 1.0 that represents the saturation of the color.
valueA double from 0.0 to 1.0 that represents the brightness of the color.
Returns
Returns a reference to a color.

◆ set_web()

def vex.Color.set_web (   self,
  web_color_str 
)

◆ value()

def vex.Color.value (   self)

Gets the 0xRRGGBB color value.

◆ is_transparent()

def vex.Color.is_transparent (   self)

Gets the state of the color's transparency.

Returns
Returns true if the color is transparent.

◆ from_rgb()

def vex.Color.from_rgb (   r,
  g,
  b 
)
static

◆ from_hsv()

def vex.Color.from_hsv (   h,
  s,
  v 
)
static

◆ from_web()

def vex.Color.from_web (   web_color_str)
static

Member Data Documentation

◆ BLACK

vex.Color.BLACK = None
static

◆ WHITE

vex.Color.WHITE = None
static

◆ RED

vex.Color.RED = None
static

◆ GREEN

vex.Color.GREEN = None
static

◆ BLUE

vex.Color.BLUE = None
static

◆ YELLOW

vex.Color.YELLOW = None
static

◆ ORANGE

vex.Color.ORANGE = None
static

◆ PURPLE

vex.Color.PURPLE = None
static

◆ CYAN

vex.Color.CYAN = None
static

◆ TRANSPARENT

vex.Color.TRANSPARENT = None
static