.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OEColorSurfaceByPotential

..  _OESpicoli_OEColorSurfaceByPotential:

.. oe:function:: OEColorSurfaceByPotential

   .. oe:language:: c++ java csharp

      .. oe:api::

         void OEColorSurfaceByPotential(OESurface& surf,
                                        OESystem::OEColorGradientBase& grad,
                                        const unsigned alpha = 255)

   .. oe:language:: python

      .. oe:api:: python

         OEColorSurfaceByPotential(surf: OESurface, grad: OEColorGradientBase,
                                   alpha: int = 255) -> None

   Method to color a surface using a defined gradient based on the stored potentials on the 
   surface vertices.

   .. seealso::

      * :ref:`surfaces_associative_data`
      * :ref:`OEColorGradientBase <OESystem_OEColorGradientBase>`
