Module colors :: Class RGB
[hide private]
[frames] | no frames]

Class RGB

source code

Represents a color as an RGB (red green blue) value

Instance Methods [hide private]
 
name(self) source code
Class Methods [hide private]
 
fromCOLORREF(cls, c)
factory method to create an RGB from a COLORREF ctypes instance
source code
 
fromString(cls, s)
Factory method to create an RGB instance from a css RGB string representation.
source code
Static Methods [hide private]
 
_RGBStringValToInt(s) source code
Class Variables [hide private]
  _re_RGBFunctionString = re.compile(r'rgb\(\s*(\d+%?)\s*,\s*(\d...
  _re_RGBAFunctionString = re.compile(r'rgba\(\s*(\d+%?)\s*,\s*(...
Method Details [hide private]

name(self)

source code 
Decorators:
  • @property

Class Variable Details [hide private]

_re_RGBFunctionString

Value:
re.compile(r'rgb\(\s*(\d+%?)\s*,\s*(\d+%?)\s*,\s*(\d+%?)\s*\)', re.I)

_re_RGBAFunctionString

Value:
re.compile(r'rgba\(\s*(\d+%?)\s*,\s*(\d+%?)\s*,\s*(\d+%?)\s*,\s*\d+(\.\
\d+)?\s*\)', re.I)