code: def hex_is_dark(hexx, percent=50):
      
      r, g, b = hex_to_rgb(hexx)
      luma = (0.2126 * r + 0.7152 * g + 0.0722 * b) / 2.55  # per ITU-R BT.709
  
      return (luma < percent)
docs: Function to decide if a hex colour is dark.
  
      Args:
          hexx (str): A hexadecimal colour, starting with '#'.
  
      Returns:
          bool: The colour's brightness is less than the given percent.