Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Improve palette reduction algorithm #41

@max-vogler

Description

@max-vogler

To reduce the amount of colors of non-pixelart images, we currently pick the n most common colors and replace all other colors with the closest selected color. There are three big areas for optimization:

  • Proposing a target color set (e.g. with k-means?)
  • Improve the distance function, which currently only calculates the sum of differences of RGB values.
  • Reducing the palette of an image to the target color set

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions