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

NameTypeAccessDescription
rfloatReadGet the red component.
gfloatReadGet the green component.
bfloatReadGet the blue component.
afloatReadGet the alpha component.

Methods

SignatureDescription
__init__(r: float, g: float, b: float, a: float)Initialize a color.
aqua()ColorGet the aqua color (0.0, 1.0, 1.0).
blue()ColorGet the blue color (0.0, 0.0, 1.0).
azure()ColorGet the azure color (0.94, 0.97, 1.0).
red()ColorGet the red color (1.0, 0.0, 0.0).
green()ColorGet the green color (0.0, 1.0, 0.0).
yellow()ColorGet the yellow color (1.0, 1.0, 0.0).
black()ColorGet the black color (0.0, 0.0, 0.0).
white()ColorGet the white color (1.0, 1.0, 1.0).
gray()ColorGet the gray color (0.5, 0.5, 0.5).
Aqua()ColorGet the aqua color (alias for aqua).
Blue()ColorGet the blue color (alias for blue).
Azure()ColorGet the azure color (alias for azure).
Red()ColorGet the red color (alias for red).
Green()ColorGet the green color (alias for green).
Yellow()ColorGet the yellow color (alias for yellow).
Black()ColorGet the black color (alias for black).
White()ColorGet the white color (alias for white).
Gray()ColorGet the gray color (alias for gray).

See Also