1
0
Fork 0
forked from 0x2620/oxjs

change the signature of Ox.pad to match Ox.truncate

This commit is contained in:
rolux 2012-06-04 11:08:38 +02:00
commit a5c6747b57
10 changed files with 62 additions and 29 deletions

View file

@ -108,7 +108,7 @@ Ox.toHex <f> Format RGB array as hex value
@*/
Ox.toHex = function(rgb) {
return rgb.map(function(value) {
return Ox.pad(value.toString(16).toUpperCase(), 2);
return Ox.pad(value.toString(16).toUpperCase(), 'left', 2, '0');
}).join('');
};