JavaScript
Run Code
Open in Fiddle
var yellowGreenColor = Ext.draw.Color.fromHSL(79.74, 0.61, .5), gsv = yellowGreenColor.getGrayscale(), grayColor = Ext.draw.Color.create(gsv,gsv,gsv); Ext.getBody().appendChild({ tag : 'div', html : 'toString(): ' + yellowGreenColor.toString() + '<br /><br />', style : 'padding:15px;height:100px;display:inline-block;border:solid 1px;margin:10px;background-color:' + yellowGreenColor.toString() }); Ext.getBody().appendChild({ tag : 'div', html : 'The "gray": ' + gsv +'<br /><br />toString(): ' + grayColor.toString(), style : 'padding:15px;height:100px;display:inline-block;border:solid 1px;margin:10px;background-color:' + grayColor.toString() });