mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 02:36:17 +03:00
Adjusted formatting [ci skip]
This commit is contained in:
parent
6c0af0fdfb
commit
e64d62e568
|
@ -17,19 +17,10 @@ Color Names
|
||||||
The ImageColor module supports the following string formats:
|
The ImageColor module supports the following string formats:
|
||||||
|
|
||||||
* Hexadecimal color specifiers, given as ``#rgb``, ``#rgba``, ``#rrggbb`` or
|
* Hexadecimal color specifiers, given as ``#rgb``, ``#rgba``, ``#rrggbb`` or
|
||||||
``#rrggbbaa``, with the following placeholders:
|
``#rrggbbaa``, where ``r`` is red, ``g`` is green, ``b`` is blue and ``a`` is
|
||||||
|
alpha (also called 'opacity'). For example, ``#ff0000`` specifies pure red,
|
||||||
- ``r`` red
|
and ``#ff0000cc`` specifies red with 80% opacity (``cc`` is 204 in decimal
|
||||||
- ``g`` green
|
form, and 204 / 255 = 0.8).
|
||||||
- ``b`` blue
|
|
||||||
- ``a`` alpha / opacity
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
- ``#ff0000`` specifies pure red.
|
|
||||||
- ``#ff0000cc`` specifies pure red with an opacity of 80% (cc = 204, opacity =
|
|
||||||
204/255).
|
|
||||||
|
|
||||||
|
|
||||||
* 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