Represents a colour from the API.
- cmyk (
CMYK
)
Returns a class holding the CMYK values of the colour. - gradient (
Image
)
Returns an image showing all possible gradients of the colour. Alias forColourImages
.gradient. - hex (
Hex
)
Returns a class holding the hex value of the colour. - hsl (
HSL
)
Returns a class holding the HSL values of the colour. - image (
str
) The image of the colour. Alias forColourImages
.square. - images (
ColourImages
)
Returns a class holding different images of the colour. Use.square
and.gradient
attributes to access each image. - int (
int
) The integer value of the colour. - name (
str
)
The name of the colour. - rgb (
RGB
)
Returns a class holding the RGB values of the colour. - safe_text_colour (
SafeTextColour
)
Returns a class holding the safe text colour for readability on images, etc. - shades (
List
[str
]) The shades of the colour. - square (
Image
)
Returns a square image of the colour. Alias forColourImages
.square. - tints (
List
[str
]) The tints of the colour. - websafe (
Colour
)
Returns a class holding the websafe version of the colour (for legacy browser support).
Represents a class holding different images of a Colour.
- colour (
Colour
) The colour this class is associated with. - gradient (
Image
)
Returns an image with all possible gradients of the colour. - square (
Image
)
Returns a square image of the colour.
Represents a websafe version of a Colour but with the websafe
attribute returning the same class for infinite recursion reasons.
Represents a class holding the CMYK values of a Colour.
- string (
str
) The CMYK value as a string. - values (
List
[int
])
The CMYK values as a list of integers. - c (
int
) The cyan value. - m (
int
) The magenta value. - y (
int
) The yellow value. - k (
int
) The black value.
Represents a class holding RGB values of a Colour.
- r (
int
))
The red value. - g (
int
))
The green value. - b (
int
))
The blue value. - string (
str
))
The RGB value as a string. - values (
List
[int
])
The RGB values as a list of integers.
Represents a class holding information about a colour's hex value.
- string (
str
) The hex value as a string. - values (
List
[str
])
The hex value split into a list (two characters per item). - clean (
str
) The hex value without the#
. - shorten (
Optional
[str
]) The shortened hex value, if available.
Represents a class holding HSL values of a Colour.
- string (
str
) The HSL value as a string. - values (
List
[int
]) The HSL values as a list of integers. - h (
int
) The hue value. - s (
int
)
The saturation value. - l (
int
) The lightness value.
Represents a class holding the "safe" version of a Colour for text readability.
- name (
str
): The name of the colour. - hex (
str
): The hex value of the colour. - rgb (
SafeTextColourRGB
): The RGB values of the colour.
Represents a class holding RGB values of a SafeTextColour.
- r (
int
) The red value. - g (
int
) The green value. - b (
int
)
The blue value. - values (
List
[int
])
The RGB values as a list of integers.