palette - Quick access to named CSS4 colours
- Purpose:
This class module provides quick-access to CSS-4 named colours in both RGB and hexidecimal formats.
- Platform:
Linux/Windows | Python 3.7+
- Developer:
J Berendt
- Email:
- Comments:
n/a
- Example:
Use the hex colour palette:
>>> from utils4.palette import hexpalette >>> hexpalette.aliceblue '#F0F8FF'
Use the RGB colour palette:
>>> from utils4.palette import rgbpalette >>> rgbpalette.aliceblue [240, 248, 255]
- class palette.HexPalette[source]
Complete CSS-4 colour palette (in hex format), as object attributes.
- __init__()[source]
HexPalette class initialiser.
This initialiser dynamically creates all named colours as class attributes using the
CSS4Colours
class as its data source.
- class palette.RGBPalette[source]
Complete CSS-4 colour palette (in RGB format), as object attributes.
- __init__()[source]
RGBPalette class initialiser.
This initialiser dynamically creates all named colours as class attributes using the
CSS4Colours
class as its data source.