| java.lang.Object com.jidesoft.utils.ColorUtils
ColorUtils | public class ColorUtils (Code) | | Several useful methods for Color.
|
Method Summary | |
public static int | HSLtoRGB(float[] hsl) Converts from HSL color space to RGB color. | public static float[] | RGBtoHSL(Color colorRGB) Converts a color from RBG to HSL color space. | public static float[] | applyDifference(float[] from, int[] diff) | public static int[] | calculateDifferent(float[] from, float[] to) | public static Color | getDerivedColor(Color color, float ratio) Gets a derived color from an existing color. | public static Color[] | toColors(boolean hasalpha, int... colors) Simply calls new Color(color, hasalpha) for each color in colors and returns
all of them. |
OFFSET_100 | final static float OFFSET_100(Code) | | |
OFFSET_180 | final static float OFFSET_180(Code) | | |
HSLtoRGB | public static int HSLtoRGB(float[] hsl)(Code) | | Converts from HSL color space to RGB color.
Parameters: hsl - the RGB color. |
RGBtoHSL | public static float[] RGBtoHSL(Color colorRGB)(Code) | | Converts a color from RBG to HSL color space.
Parameters: colorRGB - color space in HSL. |
applyDifference | public static float[] applyDifference(float[] from, int[] diff)(Code) | | |
calculateDifferent | public static int[] calculateDifferent(float[] from, float[] to)(Code) | | |
getDerivedColor | public static Color getDerivedColor(Color color, float ratio)(Code) | | Gets a derived color from an existing color. The derived color is either lighter
or darker version of the given color with the same hue.
Parameters: color - the given color. Parameters: ratio - the ratio. the derived color. |
toColors | public static Color[] toColors(boolean hasalpha, int... colors)(Code) | | Simply calls new Color(color, hasalpha) for each color in colors and returns
all of them.
Parameters: hasalpha - Parameters: colors - |
|
|