rs2.utilities.ColorPicker module#

class rs2.utilities.ColorPicker.ColorPicker#

Bases: object

RS2 can change color of an object by hex color codes or RGB.

Black = 0#
Brown = 10917#
Dark_Olive_Green = 4210688#
Dark_Green = 21760#
Dark_Teal = 6160384#
Dark_Blue = 9109504#
Indigo = 8519755#
Dark_Grey = 2631720#
Dark_Red = 139#
Orange = 2124031#
Dark_Yellow = 35723#
Green = 37632#
Teal = 9342520#
Blue = 16711680#
Blue_Grey = 12614523#
Grey_40 = 6710886#
Red = 255#
Light_Orange = 6008319#
Lime = 3329330#
Sea_Green = 7451452#
Aqua = 13959039#
Light_Blue = 12623485#
Violet = 8388736#
Grey_50 = 8355711#
Pink = 13353215#
Gold = 55295#
Yellow = 65535#
Bright_Green = 65280#
Turquoise = 13688896#
Skyblue = 16777152#
Plum = 4718664#
Light_Grey = 12632256#
Rose = 14804223#
Tan = 9221330#
Light_Yellow = 14745599#
Pale_Green = 10025880#
Pale_Turquoise = 15658671#
Pale_Blue = 9143144#
Lavender = 16443110#
White = 16777215#
getRGBFromColor()#

Returns the RGB representation of a color from its int value

Parameters:

color (int) – int representing the color

Returns:

tuple containing red, green and blue values of the color. Each of red, green and blue are between 0 and 255 inclusive

getColorFromRGB(green: int, blue: int)#

Returns the int representation of a color from its R, G, B values

Parameters:
  • red (int) – int representing red value of the color. Must be between 0 and 255 inclusive

  • green (int) – int representing green value of the color. Must be between 0 and 255 inclusive

  • blue – int representing blue value of the color. Must be between 0 and 255 inclusive