def hex_to_name(hexx):
for n, h in defaults.COLOURS.items():<EOL><INDENT>if (len(n) > <NUM_LIT:1>) and (h == hexx.upper()):<EOL><INDENT>return n.lower()<EOL><DEDENT><DEDENT>return None<EOL>
Convert hex to a color name, using matplotlib's colour names.

Args:
    hexx (str): A hexadecimal colour, starting with '#'.

Returns:
    str: The name of the colour, or None if not found.