geepillow.colors ================ .. py:module:: geepillow.colors .. autoapi-nested-parse:: Module to handle colors. Attributes ---------- .. autoapisummary:: geepillow.colors.COMMON Classes ------- .. autoapisummary:: geepillow.colors.Color Functions --------- .. autoapisummary:: geepillow.colors.color_from_string geepillow.colors.create Module Contents --------------- .. py:class:: Color(red, green, blue) Color class to handle colors. .. py:method:: __repr__() String representation of the color. .. py:method:: from_hex(hex_color) :classmethod: Create a color instance from hex. .. py:method:: from_hsv(hue, saturation, value) :classmethod: Create a color instance from HSV values. .. py:method:: hex(opacity = 1.0) Hex string of the color. .. py:method:: hsv() Compute Hue Saturation and Value (HSV space). .. py:method:: rgb() RGB of the color. .. py:attribute:: blue .. py:attribute:: green .. py:attribute:: red .. py:function:: color_from_string(string) Create a Color from a string. Accepts some common name like 'red' and if not in the common list, it will treat it as an hex color string. .. py:function:: create(color) Color dispatcher. Create a color according to the type of the object passed. :param color: can be a string, a list (R,G,B) or a Color instance .. py:data:: COMMON