mirror of
https://github.com/less/less.js.git
synced 2026-02-03 19:45:00 -05:00
Support for IE's ARGB syntax (#aarrggbb)
This commit is contained in:
@@ -15,6 +15,11 @@ tree.Color = function (rgb, a) {
|
||||
this.rgb = rgb.match(/.{2}/g).map(function (c) {
|
||||
return parseInt(c, 16);
|
||||
});
|
||||
} else if (rgb.length == 8) {
|
||||
this.alpha = parseInt(rgb.substring(0,2), 16) / 255.0;
|
||||
this.rgb = rgb.substr(2).match(/.{2}/g).map(function (c) {
|
||||
return parseInt(c, 16);
|
||||
});
|
||||
} else {
|
||||
this.rgb = rgb.split('').map(function (c) {
|
||||
return parseInt(c + c, 16);
|
||||
|
||||
Reference in New Issue
Block a user