European Geosciences Union (EGU) Colours¶
European Geosciences Union (EGU) colour palettes and division colours derived from EGU’s visual identity and structure overview. The package can be installed via pip:
python -m pip install egucolours
Separate sub-modules for the main palette, neutral palette, and division colors are available. Each module contains a dict-like collection colours which holds all colours of the respective palette. The colours are compatible with the matplotlib colour mechanics and can be used in the same fashion as hex-strings or RGB triples.
>>> import matplotlib.pyplot as plt
>>> import egucolours
>>> plt.plot(x, y, color=egucolours.division.AS)
Colours can be accessed by their name. For the main palette, this looks like as follows:
>>> import egucolours
>>> print(egucolours.main.colours)
{'blue': '#0072bc', 'yellow': '#ffde00'}
>>> print(egucolours.main.blue)
EGU blue: RGB 0 | 114 | 188 (#0072bc)
>>> print(egucolours.main.colours['blue'])
EGU yellow: RGB 255 | 222 | 0 (#ffde00)
Division colours can be accessed in a similar fashion:
>>> import egucolours
>>> print(egucolours.division.AS)
EGU AS: RGB 66 | 66 | 212 (#4242d4)
>>> print(egucolours.division.colours['AS'])
EGU AS: RGB 66 | 66 | 212 (#4242d4)
The egucolours package contains a top-level dict-like collection with all palettes:
>>> import egucolours
>>> print(egucolours.colours)
{'blue': '#0072bc', 'yellow': '#ffde00', 'white': '#ffffff', 'grey': '#a8a9ad', 'AS': '#4242d4',
'BG': '#1a4d04', 'CL': '#5f3172', 'CR': '#007db8', 'EMRP': '#87251f', 'ERE': '#2a6736',
'ESSI': '#6a4a96', 'G': '#a450ce', 'GD': '#aa292b', 'GI': '#757575', 'GM': '#497e74',
'GMPV': '#dc3728', 'HS': '#258838', 'NH': '#753f2f', 'NP': '#0f1e3d', 'OS': '#274b96',
'PS': '#932d75', 'SM': '#a03150', 'SSP': '#916b2a', 'SSS': '#6b4a08', 'ST': '#75387a',
'TS': '#be5409'}

Modules¶
egucolours.main¶
EGU main palette (blue/yellow).
- egucolours.main.blue = '#0072bc'¶
- egucolours.main.colours = {'blue': '#0072bc', 'yellow': '#ffde00'}¶
- egucolours.main.yellow = '#ffde00'¶
egucolours.neutral¶
EGU neutral palette (white/grey).
- egucolours.neutral.colours = {'grey': '#a8a9ad', 'white': '#ffffff'}¶
- egucolours.neutral.grey = '#a8a9ad'¶
- egucolours.neutral.white = '#ffffff'¶
egucolours.division¶
EGU division colors
- egucolours.division.AS = '#4242d4'¶
- egucolours.division.BG = '#1a4d04'¶
- egucolours.division.CL = '#5f3172'¶
- egucolours.division.CR = '#007db8'¶
- egucolours.division.EMRP = '#87251f'¶
- egucolours.division.ERE = '#2a6736'¶
- egucolours.division.ESSI = '#6a4a96'¶
- egucolours.division.G = '#a450ce'¶
- egucolours.division.GD = '#aa292b'¶
- egucolours.division.GI = '#757575'¶
- egucolours.division.GM = '#497e74'¶
- egucolours.division.GMPV = '#dc3728'¶
- egucolours.division.HS = '#258838'¶
- egucolours.division.NH = '#753f2f'¶
- egucolours.division.NP = '#0f1e3d'¶
- egucolours.division.OS = '#274b96'¶
- egucolours.division.PS = '#932d75'¶
- egucolours.division.SM = '#a03150'¶
- egucolours.division.SSP = '#916b2a'¶
- egucolours.division.SSS = '#6b4a08'¶
- egucolours.division.ST = '#75387a'¶
- egucolours.division.TS = '#be5409'¶
- egucolours.division.colours = {'AS': '#4242d4', 'BG': '#1a4d04', 'CL': '#5f3172', 'CR': '#007db8', 'EMRP': '#87251f', 'ERE': '#2a6736', 'ESSI': '#6a4a96', 'G': '#a450ce', 'GD': '#aa292b', 'GI': '#757575', 'GM': '#497e74', 'GMPV': '#dc3728', 'HS': '#258838', 'NH': '#753f2f', 'NP': '#0f1e3d', 'OS': '#274b96', 'PS': '#932d75', 'SM': '#a03150', 'SSP': '#916b2a', 'SSS': '#6b4a08', 'ST': '#75387a', 'TS': '#be5409'}¶
Classes¶
- class egucolours.Colour(name, hex_value)[source]¶
Class representation of a colour.
The colour is instantiated by its hex value, i.e. Colour(name, hex_value). This class is designed to be compatible with the matplotlib colour mechanics, but holds additional metadata in the form of the colour name.
- Parameters:
name (str) – Colour name
hex_value (str) – Hexadecimal representation of the colour (e.g., “#ffffff”)
- property RGB¶
RGB representation of colour
- Returns:
RGB triple (e.g. (255, 255, 255))
- Return type:
tuple of int
- property hex¶
HEX representation of colour
- Returns:
Colour hex string (e.g. #ffffff)
- Return type:
str
- property name¶
Colour name
- Returns:
Colour name
- Return type:
str
- property rgb¶
rgb representation of colour
- Returns:
rgb triple (e.g. (1.0, 1.0, 1.0))
- Return type:
tuple of float