
#############################
A3DGlobalGetGraphRgbColorData
#############################

.. c:function:: A3DStatus A3DGlobalGetGraphRgbColorData(const A3DUns32 uiIndexRgbColor, A3DGraphRgbColorData *pData)

   .. rst-class:: sig-pretty-signature
   
      | :c:enum:`~A3DStatus` A3DGlobalGetGraphRgbColorData(*const* :c:type:`~A3DUns32` **uiIndexRgbColor**\ , :c:struct:`~A3DGraphRgbColorData`\ \* **pData**\ )
   
   Retrieves an indexed RGB color.
   
   
      2.0
   
   
   HOOPS stores colors in a global state using indexes. When given an index, call ``A3DGlobalGetGraphRgbColorData`` to fill in an ``A3DGraphRgbColorData`` instance.
   
   .. code-block:: c
   
      // Retrieves the color code at index 3. Use gray shade as default color:
      A3DGraphRgbColorData rgb = A3D_MAKE_DATA(A3DGraphRgbColorData);
      rgb.m_dRed = rgb.m_dGreen = rgb.m_dBlue = 0.75f;
      A3DStatus result = A3DGlobalGetGraphRgbColorData(3, &rgb);
      assert(result == A3D_SUCCESS);
   
   **Return Values**
   
   
      **A3D_SUCCESS**\ : in case of success.
   
      **A3D_DEFAULT_COLOR**\ : if the input value is the index for the default color (``A3D_DEFAULT_COLOR_INDEX``\ ).
   
      **A3D_INITIALIZE_NOT_CALLED**\ : if the library is not initialized
   
      **A3D_INVALID_COLOR_INDEX**\ : if the color index does not match any color code.
   
      **A3D_INVALID_DATA_STRUCT_NULL**\ : if ``pData`` is null.
   
      **A3D_INVALID_DATA_STRUCT_SIZE**\ : if ``pData`` is incorrectly initialized
   
   
   
      ``A3DGlobalInsertGraphRgbColor``
   
   
   
      ``A3DGraphRgbColorData``
   
   
   **Parameters**
   
   
      **uiIndexRgbColor**\ : The index of the color code
   
      **pData**\ : The ``A3DGraphRgbColorData`` to fill in.
   
   
   **Returns**
   
   
      ``A3D_SUCCESS`` or an error code in case of failure.
   
   




