Color
Overview
Color is a class in Aspose.PDF FOSS for Python.
Represents a color in PDF documents.
This class provides 19 methods for working with Color objects in Python programs.
Available methods include: Aqua, Azure, Black, Blue, Gray, Green, Red, White, Yellow, __init__, aqua, azure, and 7 additional methods.
All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package.
Properties: a, b, g, r.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
r | float | Read | Get the red component. |
g | float | Read | Get the green component. |
b | float | Read | Get the blue component. |
a | float | Read | Get the alpha component. |
Methods
| Signature | Description |
|---|---|
__init__(r: float, g: float, b: float, a: float) | Initialize a color. |
aqua() → Color | Get the aqua color (0.0, 1.0, 1.0). |
blue() → Color | Get the blue color (0.0, 0.0, 1.0). |
azure() → Color | Get the azure color (0.94, 0.97, 1.0). |
red() → Color | Get the red color (1.0, 0.0, 0.0). |
green() → Color | Get the green color (0.0, 1.0, 0.0). |
yellow() → Color | Get the yellow color (1.0, 1.0, 0.0). |
black() → Color | Get the black color (0.0, 0.0, 0.0). |
white() → Color | Get the white color (1.0, 1.0, 1.0). |
gray() → Color | Get the gray color (0.5, 0.5, 0.5). |
Aqua() → Color | Get the aqua color (alias for aqua). |
Blue() → Color | Get the blue color (alias for blue). |
Azure() → Color | Get the azure color (alias for azure). |
Red() → Color | Get the red color (alias for red). |
Green() → Color | Get the green color (alias for green). |
Yellow() → Color | Get the yellow color (alias for yellow). |
Black() → Color | Get the black color (alias for black). |
White() → Color | Get the white color (alias for white). |
Gray() → Color | Get the gray color (alias for gray). |