|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.moneydance.awt.HSLColorUtil
public class HSLColorUtil
Utilities for using Hue, Saturation, Luminance (HSL) colors and converting to/from standard
Color
objects.
Field Summary | |
---|---|
static int |
HUE_INDEX
A convenience repeat of the index for the hue value in hue, saturation and luminance array return values. |
static int |
LUMINANCE_INDEX
A convenience repeat of the index for the luminance value in hue, saturation and luminance array return values. |
static int |
SATURATION_INDEX
A convenience repeat of the index for the saturation value in hue, saturation and luminance array return values. |
Method Summary | |
---|---|
static java.awt.Color |
convertHSLtoRGB(float hue,
float saturation,
float luminance)
Convert a hue, saturation and luminance color value to the standard AWT Color object. |
static float[] |
convertRGBtoHSL(java.awt.Color inColor)
Convert a standard AWT color to hue, saturation and luminance. |
static java.awt.Color |
getLighterColor(float[] hslColor,
float amount)
Make a dark color lighter (more luminance) by a specified amount. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HUE_INDEX
public static final int SATURATION_INDEX
public static final int LUMINANCE_INDEX
Method Detail |
---|
public static float[] convertRGBtoHSL(java.awt.Color inColor)
inColor
- Color to convert
HSLColorSpace.HUE_INDEX
,
HSLColorSpace.LUMINANCE_INDEX
and HSLColorSpace.SATURATION_INDEX
.public static java.awt.Color convertHSLtoRGB(float hue, float saturation, float luminance)
hue
- The hue of the color from 0.0 to 360.0saturation
- The saturation of the color from 0.0 to 1.0luminance
- The luminance (brightness) of the color from 0.0 to 1.0
Color
object closely matching the hue, saturation and luminance
parameters.public static java.awt.Color getLighterColor(float[] hslColor, float amount)
hslColor
- The color to begin with.amount
- The amount to adjust luminance (positive for lighter, negative for darker).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |