commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject svn commit: r1649947 - in /commons/proper/imaging/trunk/src: changes/ main/java/org/apache/commons/imaging/color/
Date Tue, 06 Jan 2015 20:57:15 GMT
Author: britter
Date: Tue Jan  6 20:57:14 2015
New Revision: 1649947

URL: http://svn.apache.org/r1649947
Log:
IMAGING-147: Add color constants. This also closes #3 from github. Thanks to Stephan Koeninger.

Modified:
    commons/proper/imaging/trunk/src/changes/changes.xml
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java
    commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java

Modified: commons/proper/imaging/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/changes/changes.xml?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/changes/changes.xml (original)
+++ commons/proper/imaging/trunk/src/changes/changes.xml Tue Jan  6 20:57:14 2015
@@ -46,6 +46,9 @@ The <action> type attribute can be add,u
   <body>
 
     <release version="1.0" date="TBA" description="TBA">
+      <action issue="IMAGING-147" dev="britter" type="update" due-to="Stephan Koeninger">
+        Add color constants
+      </action>
       <action issue="IMAGING-150" dev="britter" type="update" due-to="Stephan Koeninger">
         Implement equals and hashcode on color classes
       </action>

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLab.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorCieLab {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     L: 0
+     *     a: 0
+     *     b: 0
+     * </pre>
+     */
+    public static final ColorCieLab BLACK = new ColorCieLab(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     L: 100
+     *     a: 0
+     *     b: 0
+     * </pre>
+     */
+    public static final ColorCieLab WHITE = new ColorCieLab(100, 0, 0);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     L: 53
+     *     a: 80
+     *     b: 67
+     * </pre>
+     */
+    public static final ColorCieLab RED = new ColorCieLab(53, 80, 67);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     L:  88
+     *     a: -86
+     *     b:  83
+     * </pre>
+     */
+    public static final ColorCieLab GREEN = new ColorCieLab(88, -86, 83);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     L:   32
+     *     a:   79
+     *     b: -108
+     * </pre>
+     */
+    public static final ColorCieLab BLUE = new ColorCieLab(32, 79, -108);
+
     public final double L;
     public final double a;
     public final double b;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLch.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorCieLch {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     L: 0
+     *     c: 0
+     *     h: 0
+     * </pre>
+     */
+    public static final ColorCieLch BLACK = new ColorCieLch(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     L: 100
+     *     c:   0
+     *     h: 297
+     * </pre>
+     */
+    public static final ColorCieLch WHITE = new ColorCieLch(100, 0, 297);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     L: 53
+     *     c: 80
+     *     h: 67
+     * </pre>
+     */
+    public static final ColorCieLch RED = new ColorCieLch(53, 80, 67);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     L:  88
+     *     c: -86
+     *     h:  83
+     * </pre>
+     */
+    public static final ColorCieLch GREEN = new ColorCieLch(88, -86, 83);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     L:   32
+     *     c:   79
+     *     h: -108
+     * </pre>
+     */
+    public static final ColorCieLch BLUE = new ColorCieLch(32, 79, -108);
+
     public final double L;
     public final double C;
     public final double H;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCieLuv.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorCieLuv {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     L: 0.000
+     *     u: 0.000
+     *     v: 0.000
+     * </pre>
+     */
+    public static final ColorCieLuv BLACK = new ColorCieLuv(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     L: 100.000
+     *     u:   0.000
+     *     v:  -0.017
+     * </pre>
+     */
+    public static final ColorCieLuv WHITE = new ColorCieLuv(100, 0, -0.017);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     L:  53.233
+     *     u: 175.053
+     *     v:  37.751
+     * </pre>
+     */
+    public static final ColorCieLuv RED = new ColorCieLuv(53.233, 175.053, 37.751);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     L:  87.737
+     *     u: -83.080
+     *     v: 107.401
+     * </pre>
+     */
+    public static final ColorCieLuv GREEN = new ColorCieLuv(87.737, -83.080, 107.401);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     L:   32.303
+     *     u:   -9.400
+     *     v: -130.358
+     * </pre>
+     */
+    public static final ColorCieLuv BLUE = new ColorCieLuv(32.303, -9.400, -130.358);
+
     public final double L;
     public final double u;
     public final double v;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmy.java
Tue Jan  6 20:57:14 2015
@@ -17,6 +17,86 @@
 package org.apache.commons.imaging.color;
 
 public final class ColorCmy {
+    
+    /**
+     * A constant for color cyan. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 0
+     *     yellow:  0
+     * </pre>
+     */
+    public static final ColorCmy CYAN = new ColorCmy(100, 0, 0);
+
+    /**
+     * A constant for color magenta. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 100
+     *     yellow:  0
+     * </pre>
+     */
+    public static final ColorCmy MAGENTA = new ColorCmy(0, 100, 0);
+
+    /**
+     * A constant for color yellow. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 0
+     *     yellow:  100
+     * </pre>
+     */
+    public static final ColorCmy YELLOW = new ColorCmy(0, 0, 100);
+
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 100
+     *     yellow:  100
+     * </pre>
+     */
+    public static final ColorCmy BLACK = new ColorCmy(100, 100, 100);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 0
+     *     yellow:  0
+     * </pre>
+     */
+    public static final ColorCmy WHITE = new ColorCmy(0, 0, 0);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 100
+     *     yellow:  100
+     * </pre>
+     */
+    public static final ColorCmy RED = new ColorCmy(0, 100, 100);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 0
+     *     yellow:  100
+     * </pre>
+     */
+    public static final ColorCmy GREEN = new ColorCmy(100, 0, 100);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 100
+     *     yellow:  0
+     * </pre>
+     */
+    public static final ColorCmy BLUE = new ColorCmy(100, 100, 0);
 
     public final double C;
     public final double M;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorCmyk.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,94 @@ package org.apache.commons.imaging.color
 
 public final class ColorCmyk {
 
+    /**
+     * A constant for color cyan. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 0
+     *     yellow:  0
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk CYAN = new ColorCmyk(100, 0, 0, 0);
+
+    /**
+     * A constant for color magenta. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 100
+     *     yellow:  0
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk MAGENTA = new ColorCmyk(0, 100, 0, 0);
+
+    /**
+     * A constant for color yellow. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 0
+     *     yellow:  100
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk YELLOW = new ColorCmyk(0, 0, 100, 0);
+
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 0
+     *     yellow:  0
+     *     key:     100
+     * </pre>
+     */
+    public static final ColorCmyk BLACK = new ColorCmyk(0, 0, 0, 100);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 0
+     *     yellow:  0
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk WHITE = new ColorCmyk(0, 0, 0, 0);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     cyan:    0
+     *     magenta: 100
+     *     yellow:  100
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk RED = new ColorCmyk(0, 100, 100, 0);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 0
+     *     yellow:  100
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk GREEN = new ColorCmyk(100, 0, 100, 0);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     cyan:    100
+     *     magenta: 100
+     *     yellow:  0
+     *     key:     0
+     * </pre>
+     */
+    public static final ColorCmyk BLUE = new ColorCmyk(100, 100, 0, 0);
+
     public final double C;
     public final double M;
     public final double Y;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsl.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorHsl {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     Hue:        0
+     *     Saturation: 0
+     *     Lightness:  0
+     * </pre>
+     */
+    public static final ColorHsl BLACK = new ColorHsl(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     Hue:        0
+     *     Saturation: 0
+     *     Lightness:  100
+     * </pre>
+     */
+    public static final ColorHsl WHITE = new ColorHsl(0, 0, 100);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     Hue:        0
+     *     Saturation: 100
+     *     Lightness:  100
+     * </pre>
+     */
+    public static final ColorHsl RED = new ColorHsl(0, 100, 100);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     Hue:        120
+     *     Saturation: 100
+     *     Lightness:  100
+     * </pre>
+     */
+    public static final ColorHsl GREEN = new ColorHsl(120, 100, 100);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     Hue:        240
+     *     Saturation: 100
+     *     Lightness:  100
+     * </pre>
+     */
+    public static final ColorHsl BLUE = new ColorHsl(240, 100, 100);
+
     public final double H;
     public final double S;
     public final double L;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHsv.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorHsv {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     Hue:        0
+     *     Saturation: 0
+     *     Value:      0
+     * </pre>
+     */
+    public static final ColorHsv BLACK = new ColorHsv(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     Hue:        0
+     *     Saturation: 0
+     *     Value:      100
+     * </pre>
+     */
+    public static final ColorHsv WHITE = new ColorHsv(0, 0, 100);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     Hue:        0
+     *     Saturation: 100
+     *     Value:      100
+     * </pre>
+     */
+    public static final ColorHsv RED = new ColorHsv(0, 100, 100);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     Hue:        120
+     *     Saturation: 100
+     *     Value:      100
+     * </pre>
+     */
+    public static final ColorHsv GREEN = new ColorHsv(120, 100, 100);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     Hue:        240
+     *     Saturation: 100
+     *     Value:      100
+     * </pre>
+     */
+    public static final ColorHsv BLUE = new ColorHsv(240, 100, 100);
+
     public final double H;
     public final double S;
     public final double V;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorHunterLab.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorHunterLab {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     L: 0
+     *     a: 0
+     *     b: 0
+     * </pre>
+     */
+    public static final ColorHunterLab BLACK = new ColorHunterLab(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     L: 100.000
+     *     a:  -5.336
+     *     b:   5.433
+     * </pre>
+     */
+    public static final ColorHunterLab WHITE = new ColorHunterLab(100, -5.336, 5.433);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     L: 46.109
+     *     a: 78.962
+     *     b: 29.794
+     * </pre>
+     */
+    public static final ColorHunterLab RED = new ColorHunterLab(46.109, 78.962, 29.794);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     L:  84.569
+     *     a: -72.518
+     *     b:  50.842
+     * </pre>
+     */
+    public static final ColorHunterLab GREEN = new ColorHunterLab(84.569, -72.518, 50.842);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     L:   26.870
+     *     a:   72.885
+     *     b: -190.923
+     * </pre>
+     */
+    public static final ColorHunterLab BLUE = new ColorHunterLab(26.870, 72.885, -190.923);
+
     public final double L;
     public final double a;
     public final double b;

Modified: commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java?rev=1649947&r1=1649946&r2=1649947&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java
(original)
+++ commons/proper/imaging/trunk/src/main/java/org/apache/commons/imaging/color/ColorXyz.java
Tue Jan  6 20:57:14 2015
@@ -18,6 +18,56 @@ package org.apache.commons.imaging.color
 
 public final class ColorXyz {
 
+    /**
+     * A constant for color black. Color components are:
+     * <pre>
+     *     X: 0
+     *     Y: 0
+     *     Z: 0
+     * </pre>
+     */
+    public static final ColorXyz BLACK = new ColorXyz(0, 0, 0);
+
+    /**
+     * A constant for color white. Color components are:
+     * <pre>
+     *     X:  95.05
+     *     Y: 100.00
+     *     Z: 108.90
+     * </pre>
+     */
+    public static final ColorXyz WHITE = new ColorXyz(95.05, 100, 108.9);
+
+    /**
+     * A constant for color red. Color components are:
+     * <pre>
+     *     X: 41.24
+     *     Y: 21.26
+     *     Z:  1.93
+     * </pre>
+     */
+    public static final ColorXyz RED = new ColorXyz(41.24, 21.26, 1.93);
+
+    /**
+     * A constant for color green. Color components are:
+     * <pre>
+     *     X: 35.76
+     *     Y: 71.52
+     *     Z: 11.92
+     * </pre>
+     */
+    public static final ColorXyz GREEN = new ColorXyz(35.76, 71.52, 11.92);
+
+    /**
+     * A constant for color blue. Color components are:
+     * <pre>
+     *     X: 18.05
+     *     Y:  7.22
+     *     Z: 95.05
+     * </pre>
+     */
+    public static final ColorXyz BLUE = new ColorXyz(18.05, 7.22, 95.05);
+
     public final double X;
     public final double Y;
     public final double Z;



Mime
View raw message