| java.lang.Object com.pagosoft.swing.ColorUtils
ColorUtils | public class ColorUtils (Code) | | |
HSVtoRGB | public static Color HSVtoRGB(double[] data)(Code) | | Returns the color object represented by the HSV.
The code is taken from Twyst .
I've just translated it into Java.
author: Twyst, Patrick Gotthardt Parameters: data - An double[] with three items (0=h; s=1; 2=v) The Color object based on the HSV values |
HSVtoRGB | public static Color HSVtoRGB(double h, double s, double v)(Code) | | Returns the color object represented by the HSV.
The code is taken from Twyst .
I've just translated it into Java.
All values must be between 0 and 255!.
author: Twyst, Patrick Gotthardt Parameters: h - The "H"-value of the color. Parameters: s - The "S"-value of the color. Parameters: v - The "V"-value of the color. The Color object based on the HSV values |
RGBtoHSV | public static double[] RGBtoHSV(Color c)(Code) | | Returns the HSV representation of the RGB-Color. All values are between 0 and 255.
The code is taken from Twyst .
I've just translated it into Java.
author: Twyst, Patrick Gotthardt Parameters: c - The color to be translated to HSV. An double[] with three items (0=h; s=1; 2=v) |
getSimiliarColor | public static Color getSimiliarColor(Color color, float factor)(Code) | | |
getTranslucentColor | public static Color getTranslucentColor(Color c, int alpha)(Code) | | |
mixColors | public static Color[] mixColors(Color c)(Code) | | Returns an array of 9 colors which one could use very good together.
The code to calculate the colors is taken from Twyst .
I've just translated it into Java.
author: Twyst, Patrick Gotthardt Parameters: c - The base Color (returned as index 0) An Array of colors which are harmonic to the base color. |
toColor | public static Color toColor(String str)(Code) | | Can be:
(255, 0, 0)
255, 0, 0
#FF0000
#F00
red
|
|
|