Your preferences have been saved!
» A widget to manipulate an RGBA colour. - import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.util.LinkedList; import java.util.List; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider;... 05 Feb 12 » HSV to RGB - import java.util.ArrayList; import java.util.Collections; import java.util.List; public class ColorHelper {     private final static int H_STEPS = 12;     private final static int S_STEPS = 3;     private final static float S_STEP_VALUE = 0.05f;     private final static float S_MIN_VALUE = 0.15f;     private final static List<String> staticColors ;... 05 Feb 12 » Utility for working with natively-ordered integer-packed RGBA-format colours. - import java.nio.ByteOrder; /**  * Utility for working with natively-ordered integer-packed RGBA-format colours.  * Nice and easy to squirt to OpenGL. Beware that byte order can change from  * machine to machine, so if you're saving the packed values to disk, use  * {@link #toBigEndian(int)} to write and {@link #fromBigEndian(int)} to read  *   * @author ryanm  */ public class Colour {... 05 Feb 12 » Blend two colors - import java.awt.Color; /**  * @author Cameron Behar  */ public class ColorUtilities {   public static Color blend(Color c0, Color c1) {     double totalAlpha = c0.getAlpha() + c1.getAlpha();     double weight0 = c0.getAlpha() / totalAlpha;     double weight1 = c1.getAlpha() / totalAlpha;     double r = weight0 * c0.getRed() + weight1 * c1.getRed();... 05 Feb 12 » Darkens a color by a given amount - import java.awt.Color; /** A set of tools for analyzing and manipulating colors */ public class ColorUtils {   /**    * Darkens a color by a given amount    *     * @param color The color to darken    * @param amount The amount to darken the color. 0 will leave the color unchanged; 1 will make    *        the color completely black... 05 Feb 12 » Lightens a color by a given amount - import java.awt.Color; /** A set of tools for analyzing and manipulating colors */ public class ColorUtils {   /**    * Lightens a color by a given amount    *     * @param color The color to lighten    * @param amount The amount to lighten the color. 0 will leave the color unchanged; 1 will make    *        the color completely white... 05 Feb 12 » Performs a somewhat subjective analysis of a color to determine - import java.awt.Color; /** A set of tools for analyzing and manipulating colors */ public class ColorUtils {   /**    * Performs a somewhat subjective analysis of a color to determine how dark it looks to a user    *     * @param color The color to analyze    * @return The darkness of the color    */... 05 Feb 12 » Parses a java.awt.Color from an HTML color string in the - import java.awt.Color; /** A set of tools for analyzing and manipulating colors */ public class ColorUtils {   /**    * Parses a java.awt.Color from an HTML color string in the form '#RRGGBB' where RR, GG, and BB    * are the red, green, and blue bytes in hexadecimal form    *     * @param htmlColor The HTML color string to parse    * @return The java.awt.Color represented by the HTML color string... 05 Feb 12 » Serializes a color to its HTML markup (e.g. "#ff0000" for - import java.awt.Color; /** A set of tools for analyzing and manipulating colors */ public class ColorUtils {   /**    * Serializes a color to its HTML markup (e.g. "#ff0000" for red)    *     * @param c The color to serialize    * @return The HTML markup of the color    */... 05 Feb 12 » Return a string representation of a color - import java.awt.Color; public class Util {   /**    * Return a string representation of a color    *     * @param color    * @return string representation    */   public static String colorToString(Color color) {     if (color == null) {... 05 Feb 12