Index: trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 6748)
+++ trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/ExpressionFactory.java	(revision 6749)
@@ -216,4 +216,5 @@
         /**
          * Get the value of the red color channel in the rgb color model
+         * @return the red color channel in the range [0;1]
          * @see java.awt.Color#getRed()
          */
@@ -224,4 +225,5 @@
         /**
          * Get the value of the green color channel in the rgb color model
+         * @return the green color channel in the range [0;1]
          * @see java.awt.Color#getGreen()
          */
@@ -232,8 +234,18 @@
         /**
          * Get the value of the blue color channel in the rgb color model
+         * @return the blue color channel in the range [0;1]
          * @see java.awt.Color#getBlue()
          */
         public static float blue(Color c) {
             return Utils.color_int2float(c.getBlue());
+        }
+
+        /**
+         * Get the value of the alpha channel in the rgba color model
+         * @return the alpha channel in the range [0;1]
+         * @see java.awt.Color#getAlpha()
+         */
+        public static float alpha(Color c) {
+            return Utils.color_int2float(c.getAlpha());
         }
 
Index: trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 6748)
+++ trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 6749)
@@ -257,5 +257,6 @@
 
     /**
-     * convert back
+     * convert integer range 0..255 to float range 0 <= x <= 1
+     * when dealing with colors and color alpha value
      */
     public static Float color_int2float(Integer val) {
