Your preferences have been saved!
» Filter image by multiplier its red, green and blue color - import java.awt.Color; import java.awt.image.RGBImageFilter; /**  * ColorComponentScaler -- filters an image by multiplier its red, green and  * blue color components by their given scale factors  */ public class ColorComponentScaler extends RGBImageFilter {   private double redMultiplier, greenMultiplier, blueMultiplier;   private int newRed, newGreen, newBlue;   private Color color, newColor;... 14 Feb 12 » Getting the Color Model of an Image - import java.awt.Image; import java.awt.image.BufferedImage; import java.awt.image.ColorModel; import java.awt.image.PixelGrabber; import javax.swing.ImageIcon; public class Main {   public static void main(String[] argv) throws Exception {     Image image = new ImageIcon("a.png").getImage();     if (image instanceof BufferedImage) {       BufferedImage bimage = (BufferedImage) image;... 08 Feb 12 » Color Icon - import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import java.awt.Insets; import javax.swing.Icon; // public class ColorIcon implements Icon {   private int iWidth;   private int iHeight;... 06 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 » Return a Color object given a string representation of it - import java.awt.Color; public class Util{     /**   * Return a <code>Color</code> object given a string representation of it   *   * @param color   * @return string representation   * @throws IllegalArgumentException if string in bad format   */       public static Color stringToColor(String s) {... 05 Feb 12