mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-25 00:34:14 +03:00
Merge pull request #5181 from macjohnny/patch-1
Docs: add alpha channel to supported hex color specifiers
This commit is contained in:
commit
c2203a13a8
|
@ -16,8 +16,11 @@ Color Names
|
||||||
|
|
||||||
The ImageColor module supports the following string formats:
|
The ImageColor module supports the following string formats:
|
||||||
|
|
||||||
* Hexadecimal color specifiers, given as ``#rgb`` or ``#rrggbb``. For example,
|
* Hexadecimal color specifiers, given as ``#rgb``, ``#rgba``, ``#rrggbb`` or
|
||||||
``#ff0000`` specifies pure red.
|
``#rrggbbaa``, where ``r`` is red, ``g`` is green, ``b`` is blue and ``a`` is
|
||||||
|
alpha (also called 'opacity'). For example, ``#ff0000`` specifies pure red,
|
||||||
|
and ``#ff0000cc`` specifies red with 80% opacity (``cc`` is 204 in decimal
|
||||||
|
form, and 204 / 255 = 0.8).
|
||||||
|
|
||||||
* RGB functions, given as ``rgb(red, green, blue)`` where the color values are
|
* RGB functions, given as ``rgb(red, green, blue)`` where the color values are
|
||||||
integers in the range 0 to 255. Alternatively, the color values can be given
|
integers in the range 0 to 255. Alternatively, the color values can be given
|
||||||
|
|
Loading…
Reference in New Issue
Block a user