Inheritance diagram for wx.Colour:
A colour is an object representing a combination of Red, Green, and Blue (RGB) intensity values, and is used to determine drawing colours. See the entry for wx.ColourDatabase for how a pointer to a predefined, named colour may be returned instead of creating a new colour.
Valid RGB values are in the range 0 to 255.
You can retrieve the current system colour settings with wx.SystemSettings.
See also
wx.ColourDatabase, wx.Pen, wx.Brush, wx.ColourDialog, wx.SystemSettings
Constructs a colour from red, green, blue and alpha values.
Parameters:
Returns:
Returns the alpha value, on platforms where alpha is not yet supported, this always returns wx.ALPHA_OPAQUE.
Returns:
int
Returns the blue intensity.
Returns:
int
Returns the RGB intensity values as a tuple, optionally the alpha value as well.
Parameters:
Returns:
(r, g, b) or (r, g, b, a)
Returns the colour as a string.
Parameters:
flags (bool): Acceptable flags are:
wx.C2S_NAME |
Returns colour name, when possible |
wx.C2S_CSS_SYNTAX |
Returns colour in rgb(r, g, b) syntax |
wx.C2S_HTML_SYNTAX |
Returns colour in #rrggbb syntax |
Returns:
string
Returns a pixel value which is platform-dependent. On Windows, a COLORREF is returned. On X, an allocated pixel value is returned.
-1 is returned if the pixel is invalid (on X, unallocated).
Returns:
int
Returns the RGB intensity values as a tuple.
Returns:
(r, g, b)
Returns the green intensity.
Returns:
int
Returns True if the colour object is valid (the colour has been initialised with RGB values).
Returns:
int
Synonim for IsOk.
Returns True if the colour object is valid (the colour has been initialised with RGB values).
Returns:
int
Returns the red intensity.
Returns:
int
Sets the RGB intensity values.
Parameters:
Sets the RGB intensity values using a colour name listed in wx.TheColourDatabase.
Parameters:
Sets the RGB intensity values from a packed RGB value.
Parameters: