Color

class wpilib.Color(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

Represents colors that can be used with Addressable LEDs.

Limited to 12 bits of precision.

Overloaded function.

  1. __init__(self: wpilib._wpilib.Color) -> None

  2. __init__(self: wpilib._wpilib.Color, red: float, green: float, blue: float) -> None

Constructs a Color.

Parameters
  • red – Red value (0-1)

  • green – Green value (0-1)

  • blue – Blue value (0-1)

property blue
static fromHSV(h: int, s: int, v: int)wpilib.Color

Creates a Color from HSV values.

Parameters
  • h – The h value [0-180]

  • s – The s value [0-255]

  • v – The v value [0-255]

Returns

The color

property green
kAliceBlue = Color(red=0.941284, green=0.972534, blue=1.000000)
kAntiqueWhite = Color(red=0.980347, green=0.921509, blue=0.843140)
kAqua = Color(red=0.000122, green=1.000000, blue=1.000000)
kAquamarine = Color(red=0.497925, green=1.000000, blue=0.831421)
kAzure = Color(red=0.941284, green=1.000000, blue=1.000000)
kBeige = Color(red=0.960815, green=0.960815, blue=0.862671)
kBisque = Color(red=1.000000, green=0.894165, blue=0.768677)
kBlack = Color(red=0.000122, green=0.000122, blue=0.000122)
kBlanchedAlmond = Color(red=1.000000, green=0.921509, blue=0.803833)
kBlue = Color(red=0.000122, green=0.000122, blue=1.000000)
kBlueViolet = Color(red=0.541138, green=0.168579, blue=0.886353)
kBrown = Color(red=0.647095, green=0.164673, blue=0.164673)
kBurlywood = Color(red=0.870483, green=0.721558, blue=0.529419)
kCadetBlue = Color(red=0.372437, green=0.619507, blue=0.627563)
kChartreuse = Color(red=0.497925, green=1.000000, blue=0.000122)
kChocolate = Color(red=0.823608, green=0.411743, blue=0.117554)
kCoral = Color(red=1.000000, green=0.497925, blue=0.313843)
kCornflowerBlue = Color(red=0.392212, green=0.584351, blue=0.929321)
kCornsilk = Color(red=1.000000, green=0.972534, blue=0.862671)
kCrimson = Color(red=0.862671, green=0.078491, blue=0.235229)
kCyan = Color(red=0.000122, green=1.000000, blue=1.000000)
kDarkBlue = Color(red=0.000122, green=0.000122, blue=0.545044)
kDarkCyan = Color(red=0.000122, green=0.545044, blue=0.545044)
kDarkGoldenrod = Color(red=0.721558, green=0.525513, blue=0.043091)
kDarkGray = Color(red=0.662720, green=0.662720, blue=0.662720)
kDarkGreen = Color(red=0.000122, green=0.392212, blue=0.000122)
kDarkKhaki = Color(red=0.741089, green=0.717651, blue=0.419556)
kDarkMagenta = Color(red=0.545044, green=0.000122, blue=0.545044)
kDarkOliveGreen = Color(red=0.333374, green=0.419556, blue=0.184204)
kDarkOrange = Color(red=1.000000, green=0.548950, blue=0.000122)
kDarkOrchid = Color(red=0.599976, green=0.196167, blue=0.799927)
kDarkRed = Color(red=0.545044, green=0.000122, blue=0.000122)
kDarkSalmon = Color(red=0.913696, green=0.588257, blue=0.478394)
kDarkSeaGreen = Color(red=0.560669, green=0.737183, blue=0.560669)
kDarkSlateBlue = Color(red=0.282349, green=0.239136, blue=0.545044)
kDarkSlateGray = Color(red=0.184204, green=0.309692, blue=0.309692)
kDarkTurquoise = Color(red=0.000122, green=0.807739, blue=0.819702)
kDarkViolet = Color(red=0.580444, green=0.000122, blue=0.827515)
kDeepPink = Color(red=1.000000, green=0.078491, blue=0.576538)
kDeepSkyBlue = Color(red=0.000122, green=0.748901, blue=1.000000)
kDenim = Color(red=0.082397, green=0.376587, blue=0.741089)
kDimGray = Color(red=0.411743, green=0.411743, blue=0.411743)
kDodgerBlue = Color(red=0.117554, green=0.564819, blue=1.000000)
kFirebrick = Color(red=0.698120, green=0.133423, blue=0.133423)
kFirstBlue = Color(red=0.000122, green=0.400024, blue=0.702026)
kFirstRed = Color(red=0.929321, green=0.109741, blue=0.141235)
kFloralWhite = Color(red=1.000000, green=0.980347, blue=0.941284)
kForestGreen = Color(red=0.133423, green=0.545044, blue=0.133423)
kFuchsia = Color(red=1.000000, green=0.000122, blue=1.000000)
kGainsboro = Color(red=0.862671, green=0.862671, blue=0.862671)
kGhostWhite = Color(red=0.972534, green=0.972534, blue=1.000000)
kGold = Color(red=1.000000, green=0.843140, blue=0.000122)
kGoldenrod = Color(red=0.854858, green=0.647095, blue=0.125610)
kGray = Color(red=0.502075, green=0.502075, blue=0.502075)
kGreen = Color(red=0.000122, green=0.502075, blue=0.000122)
kGreenYellow = Color(red=0.678345, green=1.000000, blue=0.184204)
kHoneydew = Color(red=0.941284, green=1.000000, blue=0.941284)
kHotPink = Color(red=1.000000, green=0.411743, blue=0.705933)
kIndianRed = Color(red=0.803833, green=0.360718, blue=0.360718)
kIndigo = Color(red=0.294067, green=0.000122, blue=0.509888)
kIvory = Color(red=1.000000, green=1.000000, blue=0.941284)
kKhaki = Color(red=0.941284, green=0.901978, blue=0.548950)
kLavender = Color(red=0.901978, green=0.901978, blue=0.980347)
kLavenderBlush = Color(red=1.000000, green=0.941284, blue=0.960815)
kLawnGreen = Color(red=0.486206, green=0.988159, blue=0.000122)
kLemonChiffon = Color(red=1.000000, green=0.980347, blue=0.803833)
kLightBlue = Color(red=0.678345, green=0.847046, blue=0.901978)
kLightCoral = Color(red=0.941284, green=0.502075, blue=0.502075)
kLightCyan = Color(red=0.878540, green=1.000000, blue=1.000000)
kLightGoldenrodYellow = Color(red=0.980347, green=0.980347, blue=0.823608)
kLightGray = Color(red=0.827515, green=0.827515, blue=0.827515)
kLightGreen = Color(red=0.564819, green=0.933228, blue=0.564819)
kLightPink = Color(red=1.000000, green=0.713745, blue=0.756958)
kLightSalmon = Color(red=1.000000, green=0.627563, blue=0.478394)
kLightSeaGreen = Color(red=0.125610, green=0.698120, blue=0.666626)
kLightSkyBlue = Color(red=0.529419, green=0.807739, blue=0.980347)
kLightSlateGray = Color(red=0.466675, green=0.533325, blue=0.599976)
kLightSteelBlue = Color(red=0.690308, green=0.768677, blue=0.870483)
kLightYellow = Color(red=1.000000, green=1.000000, blue=0.878540)
kLime = Color(red=0.000122, green=1.000000, blue=0.000122)
kLimeGreen = Color(red=0.196167, green=0.803833, blue=0.196167)
kLinen = Color(red=0.980347, green=0.941284, blue=0.901978)
kMagenta = Color(red=1.000000, green=0.000122, blue=1.000000)
kMaroon = Color(red=0.502075, green=0.000122, blue=0.000122)
kMediumAquamarine = Color(red=0.400024, green=0.803833, blue=0.666626)
kMediumBlue = Color(red=0.000122, green=0.000122, blue=0.803833)
kMediumOrchid = Color(red=0.729370, green=0.333374, blue=0.827515)
kMediumPurple = Color(red=0.576538, green=0.439331, blue=0.858765)
kMediumSeaGreen = Color(red=0.235229, green=0.702026, blue=0.443237)
kMediumSlateBlue = Color(red=0.482300, green=0.407837, blue=0.933228)
kMediumSpringGreen = Color(red=0.000122, green=0.980347, blue=0.603882)
kMediumTurquoise = Color(red=0.282349, green=0.819702, blue=0.799927)
kMediumVioletRed = Color(red=0.780396, green=0.082397, blue=0.521606)
kMidnightBlue = Color(red=0.098022, green=0.098022, blue=0.439331)
kMintcream = Color(red=0.960815, green=1.000000, blue=0.980347)
kMistyRose = Color(red=1.000000, green=0.894165, blue=0.882446)
kMoccasin = Color(red=1.000000, green=0.894165, blue=0.709839)
kNavajoWhite = Color(red=1.000000, green=0.870483, blue=0.678345)
kNavy = Color(red=0.000122, green=0.000122, blue=0.502075)
kOldLace = Color(red=0.992065, green=0.960815, blue=0.901978)
kOlive = Color(red=0.502075, green=0.502075, blue=0.000122)
kOliveDrab = Color(red=0.419556, green=0.556763, blue=0.137329)
kOrange = Color(red=1.000000, green=0.647095, blue=0.000122)
kOrangeRed = Color(red=1.000000, green=0.270630, blue=0.000122)
kOrchid = Color(red=0.854858, green=0.439331, blue=0.839233)
kPaleGoldenrod = Color(red=0.933228, green=0.909790, blue=0.666626)
kPaleGreen = Color(red=0.596069, green=0.984253, blue=0.596069)
kPaleTurquoise = Color(red=0.686157, green=0.933228, blue=0.933228)
kPaleVioletRed = Color(red=0.858765, green=0.439331, blue=0.576538)
kPapayaWhip = Color(red=1.000000, green=0.937134, blue=0.835327)
kPeachPuff = Color(red=1.000000, green=0.854858, blue=0.725464)
kPeru = Color(red=0.803833, green=0.521606, blue=0.246948)
kPink = Color(red=1.000000, green=0.753052, blue=0.796021)
kPlum = Color(red=0.866577, green=0.627563, blue=0.866577)
kPowderBlue = Color(red=0.690308, green=0.878540, blue=0.901978)
kPurple = Color(red=0.502075, green=0.000122, blue=0.502075)
kRed = Color(red=1.000000, green=0.000122, blue=0.000122)
kRosyBrown = Color(red=0.737183, green=0.560669, blue=0.560669)
kRoyalBlue = Color(red=0.255005, green=0.411743, blue=0.882446)
kSaddleBrown = Color(red=0.545044, green=0.270630, blue=0.074585)
kSalmon = Color(red=0.980347, green=0.502075, blue=0.447144)
kSandyBrown = Color(red=0.956909, green=0.643188, blue=0.376587)
kSeaGreen = Color(red=0.180298, green=0.545044, blue=0.341187)
kSeashell = Color(red=1.000000, green=0.960815, blue=0.933228)
kSienna = Color(red=0.627563, green=0.321655, blue=0.176392)
kSilver = Color(red=0.753052, green=0.753052, blue=0.753052)
kSkyBlue = Color(red=0.529419, green=0.807739, blue=0.921509)
kSlateBlue = Color(red=0.415649, green=0.352905, blue=0.803833)
kSlateGray = Color(red=0.439331, green=0.502075, blue=0.564819)
kSnow = Color(red=1.000000, green=0.980347, blue=0.980347)
kSpringGreen = Color(red=0.000122, green=1.000000, blue=0.497925)
kSteelBlue = Color(red=0.274536, green=0.509888, blue=0.705933)
kTan = Color(red=0.823608, green=0.705933, blue=0.548950)
kTeal = Color(red=0.000122, green=0.502075, blue=0.502075)
kThistle = Color(red=0.847046, green=0.748901, blue=0.847046)
kTomato = Color(red=1.000000, green=0.388306, blue=0.278442)
kTurquoise = Color(red=0.251099, green=0.878540, blue=0.815796)
kViolet = Color(red=0.933228, green=0.509888, blue=0.933228)
kWheat = Color(red=0.960815, green=0.870483, blue=0.702026)
kWhite = Color(red=1.000000, green=1.000000, blue=1.000000)
kWhiteSmoke = Color(red=0.960815, green=0.960815, blue=0.960815)
kYellow = Color(red=1.000000, green=1.000000, blue=0.000122)
kYellowGreen = Color(red=0.603882, green=0.803833, blue=0.196167)
property red