Improved code readability
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / raster / Color.java
index e21de2d..0743cf0 100644 (file)
@@ -1,12 +1,7 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of version 3 of the GNU Lesser General Public License
- * or later as published by the Free Software Foundation.
- *
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
+ * This project is released under Creative Commons Zero (CC0) license.
  */
-
 package eu.svjatoslav.sixth.e3d.renderer.raster;
 
 public final class Color {
@@ -20,13 +15,25 @@ public final class Color {
     public static final Color PURPLE = new Color(255, 0, 255, 255);
     public static final Color TRANSPARENT = new Color(0, 0, 0, 0);
 
-    public final int r, g, b;
+    /**
+     * Red component. 0-255.
+     */
+    public final int r;
+
+    /**
+     * Green component. 0-255.
+     */
+    public final int g;
+
+    /**
+     * Blue component. 0-255.
+     */
+    public final int b;
 
     /**
-     * <pre>
-     * 255 is opaque.
-     * 0 is transparent.
-     * </pre>
+     * Alpha component.
+     * 0 - transparent.
+     * 255 - opaque.
      */
     public int a;
 
@@ -45,14 +52,14 @@ public final class Color {
     }
 
     /**
-     * <pre>
-     *     Supported formats are:
-     *
-     *     RGB
-     *     RGBA
-     *     RRGGBB
-     *     RRGGBBAA
-     * </pre>
+     * @param colorHexCode color code in hex format.
+     *                     Supported formats are:
+     *                     <pre>
+     *                     RGB
+     *                     RGBA
+     *                     RRGGBB
+     *                     RRGGBBAA
+     *                     </pre>
      */
     public Color(String colorHexCode) {
         switch (colorHexCode.length()) {