Some useful colour-related utility functions.
AdjustAlpha |
Adjust the alpha of a given colour |
AdjustColour |
Brighten/darken input colour by percent and adjust alpha |
BestLabelColour |
Get the best color to use for the label that will be drawn on |
GetHighlightColour |
Gets the default highlight color. |
AdjustAlpha
(colour, alpha)¶Adjust the alpha of a given colour
Parameters: | alpha (integer) – the new value for the colour alpha channel (between 0 and 255). |
---|---|
Return type: | wx.Colour |
Returns: | A new wx.Colour with the alpha channel specified as input |
AdjustColour
(color, percent, alpha=wx.ALPHA_OPAQUE)¶Brighten/darken input colour by percent and adjust alpha channel if needed. Returns the modified color.
Parameters: |
|
---|---|
Return type: | |
Returns: | A new darkened/lightened |
BestLabelColour
(color, bw=False)¶Get the best color to use for the label that will be drawn on top of the given color.
Parameters: |
|
---|---|
Return type: |