merge with master
[platform/framework/web/web-ui-fw.git] / build-tools / lib / less / tree / color.js
index bb7646a..6adf317 100644 (file)
@@ -94,8 +94,18 @@ tree.Color.prototype = {
             i = (i > 255 ? 255 : (i < 0 ? 0 : i)).toString(16);
             return i.length === 1 ? '0' + i : i;
         }).join('');
+    },
+    compare: function (x) {
+        if (!x.rgb) {
+            return -1;
+        }
+        
+        return (x.rgb[0] === this.rgb[0] &&
+            x.rgb[1] === this.rgb[1] &&
+            x.rgb[2] === this.rgb[2] &&
+            x.alpha === this.alpha) ? 0 : -1;
     }
 };
 
 
-})(require('less/tree'));
+})(require('../tree'));