Gleam - v1.0.2
    Preparing search index...

    Function getUsedColors

    • Count occurrences of each color in an image, keyed by #rrggbb. pixelAmount multiplies each count and floors to int; values < 1 will drop low-count colors entirely (count rounds to 0). removeLowerThan / removeHigherThan drop entries outside the range; 0 disables either bound.

      Parameters

      • image: HTMLCanvasElement
      • pixelAmount: number = 1
      • removeLowerThan: number = 0
      • removeHigherThan: number = 0

      Returns Map<string, number>