public static final class

Palette.Swatch

extends Object
java.lang.Object
   ↳ net.pierrox.lightning_launcher.script.api.palette.Palette.Swatch

Class Overview

Represents a color swatch generated from an image's palette. The RGB color can be retrieved by calling getRgb().

Summary

Public Methods
float[] getHsl()
Return this swatch's HSL values.
int getPopulation()
int getRgb()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public float[] getHsl ()

Return this swatch's HSL values. hsv[0] is Hue [0 .. 360) hsv[1] is Saturation [0...1] hsv[2] is Lightness [0...1]

public int getPopulation ()

Returns
  • the number of pixels represented by this swatch

public int getRgb ()

Returns
  • this swatch's RGB color value

public String toString ()