Package games.stendhal.common.color
Class HSL
java.lang.Object
games.stendhal.common.color.HSL
Methods for transforming between 32 bit ARGB and floating point HSL color
spaces.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HSL
public HSL()
-
-
Method Details
-
rgb2hsl
public static void rgb2hsl(int[] rgb, float[] hsl) Transform ARGB color vector to HSL space. Transparency is dropped. All returned components are in range [0, 1].- Parameters:
rgb- red, green, blue valuehsl- hue, saturation, lightness
-
hsl2rgb
public static void hsl2rgb(float[] hsl, int[] rgb) Transform HSL color vector to ARGB space. Alpha is kept at 0 for everything. All HSL should be scaled to range [0, 1].- Parameters:
rgb- red, green, blue valuehsl- hue, saturation, lightness
-