Class Palette

java.lang.Object
lol.trq.orpheus.cover.Palette

public final class Palette extends Object
Colour statistics of an image: the average, and the dominant colours found by splitting the widest colour range.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    average(int[] colours)
     
    static int[]
    dominant(int[] colours, int count)
    Up to count colours, the one covering the most samples first.
    static int[]
    sample(byte[] rgba, int width, int height)
    Picks up to 32x32 evenly spaced, mostly opaque pixels as 0xRRGGBB.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • sample

      public static int[] sample(byte[] rgba, int width, int height)
      Picks up to 32x32 evenly spaced, mostly opaque pixels as 0xRRGGBB.
    • average

      public static int average(int[] colours)
    • dominant

      public static int[] dominant(int[] colours, int count)
      Up to count colours, the one covering the most samples first.