code: def colorz(fd, n=DEFAULT_NUM_COLORS, min_v=DEFAULT_MINV, max_v=DEFAULT_MAXV,
             bold_add=DEFAULT_BOLD_ADD, order_colors=True):
      
      img = Image.open(fd)
      img.thumbnail(THUMB_SIZE)
  
      obs = get_colors(img)
      clamped = [clamp(color, min_v, max_v) for color in obs]
      clusters, _ = kmeans(array(clamped).astype(float), n)
      colors = order_by_hue(clusters) if order_colors else clusters
      return list(zip(colors, [brighten(c, bold_add) for c in colors]))
docs: Get the n most dominant colors of an image.
      Clamps value to between min_v and max_v.
  
      Creates bold colors using bold_add.
      Total number of colors returned is 2*n, optionally ordered by hue.
      Returns as a list of pairs of RGB triples.
  
      For terminal colors, the hue order is:
      red, yellow, green, cyan, blue, magenta