code: def text_colour_for_hex(hexx, percent=50, dark='#000000', light='#ffffff'):
      
      return light if hex_is_dark(hexx, percent=percent) else dark
docs: Function to decide what colour to use for a given hex colour.
  
      Args:
          hexx (str): A hexadecimal colour, starting with '#'.
  
      Returns:
          bool: The colour's brightness is less than the given percent.