JavaScript
Run Code
Open in Fiddle
var colors = { arrayColor : Ext.draw.Color.create([154,205,50]), argsColor : Ext.draw.Color.create(154,205,50,1), hexColor : Ext.draw.Color.create('#9acd32'), cssRGBColor : Ext.draw.Color.create('rgb(154,205,50)'), cssRGBAColor : Ext.draw.Color.create('rgba(154,205,50,1)'), cssNameColor : Ext.draw.Color.create('yellowgreen') }; for ( var color in colors ) { // create a new div with a background color Ext.getBody().appendChild({ tag : 'div', style : 'width:50px;height:50px;display:inline-block;border:solid 1px;margin:10px;background-color:' + colors[ color ].toString() }); }