.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.ColourData:

==========================================================================================================================================
|phoenix_title|  **wx.ColourData**
==========================================================================================================================================

This class holds a variety of information related to colour dialogs. 
         








         



.. seealso:: :ref:`wx.Colour`, :ref:`wx.ColourDialog`, :ref:`ColourDialog Overview <colourdialog overview>`    







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>ColourData</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.ColourData_inheritance.svg" alt="Inheritance diagram of ColourData" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.ColourData.html" title="This class holds a variety of information related to colour dialogs." alt="" coords="5,82,140,111"/> <area shape="rect" id="node2" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="23,5,122,34"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.ColourData.__init__`                                                  Constructor.
:meth:`~wx.ColourData.FromString`                                                Decodes the given string, which should be in the same format returned by `wx.ToString`     , and sets the internal colours.
:meth:`~wx.ColourData.GetChooseAlpha`                                            Indicates whether the colour dialog will display alpha values and an opacity selector.
:meth:`~wx.ColourData.GetChooseFull`                                             Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.
:meth:`~wx.ColourData.GetColour`                                                 Gets the current colour associated with the colour dialog.
:meth:`~wx.ColourData.GetCustomColour`                                           Returns custom colours associated with the colour dialog.
:meth:`~wx.ColourData.SetChooseAlpha`                                            Tells the colour dialog to show alpha values and an opacity selector (slider).
:meth:`~wx.ColourData.SetChooseFull`                                             Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.
:meth:`~wx.ColourData.SetColour`                                                 Sets the default colour for the colour dialog.
:meth:`~wx.ColourData.SetCustomColour`                                           Sets custom colours for the colour dialog.
:meth:`~wx.ColourData.ToString`                                                  Converts the colours saved in this class in a string form, separating the various colours with a comma.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.ColourData.ChooseAlpha`                                               See :meth:`~wx.ColourData.GetChooseAlpha` and :meth:`~wx.ColourData.SetChooseAlpha`
:attr:`~wx.ColourData.ChooseFull`                                                See :meth:`~wx.ColourData.GetChooseFull` and :meth:`~wx.ColourData.SetChooseFull`
:attr:`~wx.ColourData.Colour`                                                    See :meth:`~wx.ColourData.GetColour` and :meth:`~wx.ColourData.SetColour`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.ColourData(Object)

   **Possible constructors**::

       ColourData() -> None
       
   
   This class holds a variety of information related to colour dialogs.



   .. method:: __init__(self)

      Constructor. 
                 

      Initializes the custom colours to  ``NullColour`` , the  `data`  colour setting to black, and the `choose`  full setting to ``True``. 
                 

      :rtype: `None`     








   .. method:: FromString(self, str)

      Decodes the given string, which should be in the same format returned by `wx.ToString`     , and sets the internal colours. 
                 


      :param `str`: 
      :type `str`: string




      :rtype: `bool`








   .. method:: GetChooseAlpha(self)

      Indicates whether the colour dialog will display alpha values and an opacity selector. 
                 

      It is meaningful under wxGTK, wxOSX and with regards to generic colour dialog. 

      The default value is ``False``, except wxOSX where it is ``True`` (for the sake of backward compatibility). 
                 

      :rtype: `bool`








   .. method:: GetChooseFull(self)

      Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls. 
                 

      Has no meaning under other platforms. 

      The default value is ``True``. 
                 

      :rtype: `bool`








   .. method:: GetColour(self)

      Gets the current colour associated with the colour dialog. 
                 

      The default colour is black. 
                 

      :rtype: :ref:`wx.Colour`








   .. method:: GetCustomColour(self, i)

      Returns custom colours associated with the colour dialog. 
                 




      :param `i`: An integer between 0 and 15, being any of the 15 custom colours that the user has saved. The default custom colours are invalid colours.   
      :type `i`: int






      :rtype: :ref:`wx.Colour`




                  





   .. method:: SetChooseAlpha(self, flag)

      Tells the colour dialog to show alpha values and an opacity selector (slider). 
                 

      Currently it has effect under wxGTK, wxOSX and for generic colour dialog. 

      The default value is ``False``, except wxOSX where it is ``True`` for backward compatibility. 
                 


      :param `flag`: 
      :type `flag`: bool




      :rtype: `None`     








   .. method:: SetChooseFull(self, flag)

      Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls. 
                 

      Under other platforms, has no effect. 

      The default value is ``True``. 
                 


      :param `flag`: 
      :type `flag`: bool




      :rtype: `None`     








   .. method:: SetColour(self, colour)

      Sets the default colour for the colour dialog. 
                 

      The default colour is black. 
                 


      :param `colour`: 
      :type `colour`: wx.Colour




      :rtype: `None`     








   .. method:: SetCustomColour(self, i, colour)

      Sets custom colours for the colour dialog. 
                 




      :param `i`: An integer between 0 and 15 for whatever custom colour you want to set. The default custom colours are invalid colours.   
      :type `i`: int
      :param `colour`: The colour to set   
      :type `colour`: wx.Colour








      :rtype: `None`     




                  





   .. method:: ToString(self)

      Converts the colours saved in this class in a string form, separating the various colours with a comma. 
                 

      :rtype: `str`








   .. attribute:: ChooseAlpha

      See :meth:`~wx.ColourData.GetChooseAlpha` and :meth:`~wx.ColourData.SetChooseAlpha`


   .. attribute:: ChooseFull

      See :meth:`~wx.ColourData.GetChooseFull` and :meth:`~wx.ColourData.SetChooseFull`


   .. attribute:: Colour

      See :meth:`~wx.ColourData.GetColour` and :meth:`~wx.ColourData.SetColour`

