From fcbd4cd456f25041356dc3ca2889de9b41f42309 Mon Sep 17 00:00:00 2001 From: Joseph Atkins-Turkish Date: Wed, 30 Sep 2015 16:50:05 -0700 Subject: [PATCH 01/10] Support for colours in IB. Now it just needs a colour picker and aplite support. --- ide/static/ide/css/ib.css | 6 + ide/static/ide/js/ib/canvas.js | 9 +- ide/static/ide/js/ib/codeparser.js | 22 +- ide/static/ide/js/ib/colours.js | 3332 +++++++++++++++++ ide/static/ide/js/ib/layers/actionbarlayer.js | 10 +- ide/static/ide/js/ib/layers/bitmaplayer.js | 7 +- ide/static/ide/js/ib/layers/inverterlayer.js | 1 + ide/static/ide/js/ib/layers/textlayer.js | 12 +- ide/static/ide/js/ib/properties.js | 64 +- ide/static/ide/js/ib/toolkit.js | 12 +- ide/static/ide/js/ib/utils.js | 16 +- ide/static/ide/js/syntax.js | 64 +- ide/templates/ide/project.html | 1 + 13 files changed, 3517 insertions(+), 39 deletions(-) create mode 100644 ide/static/ide/js/ib/colours.js diff --git a/ide/static/ide/css/ib.css b/ide/static/ide/css/ib.css index 715807e7..f9197010 100644 --- a/ide/static/ide/css/ib.css +++ b/ide/static/ide/css/ib.css @@ -15,6 +15,12 @@ -webkit-filter: invert(100%); /* For Chrome/Safari/Opera - we actually prefer vendor-specific here. */ } +/* Colour Pickers */ + +.ib-colours select { + width: 170px; +} + /* Resizer */ .ib-resizer { diff --git a/ide/static/ide/js/ib/canvas.js b/ide/static/ide/js/ib/canvas.js index 45727996..71512daf 100644 --- a/ide/static/ide/js/ib/canvas.js +++ b/ide/static/ide/js/ib/canvas.js @@ -235,7 +235,7 @@ function handleBackgroundChange(colour) { mNode.css({ - 'background-color': colour.css + 'background-color': colour[IB.ColourMode].css }); self.trigger('changeBackground', colour); } @@ -346,8 +346,9 @@ this.generateInitialiser = function() { var initialiser = ["s_window = window_create();"]; - if(mProperties.bg.getValue() != IB.ColourWhite) { - initialiser.push("window_set_background_color(s_window, " + mProperties.bg.getValue() + ");"); + + if(!mProperties.bg.fullyEquals(IB.ColourWhite)) { + initialiser.push("window_set_background_color(s_window, " + mProperties.bg.generateCode() + ");"); } initialiser.push("#ifndef PBL_SDK_3"); initialiser.push(" window_set_fullscreen(s_window, " + mProperties.fullscreen.getValue() + ");"); @@ -363,7 +364,7 @@ _.each(properties, function(values, property) { switch(property) { case "window_set_background_color": - mProperties.bg.setValue(IB.ColourMap[values[0][1]]); + mProperties.bg.setValue(values[0][1]); break; case "window_set_fullscreen": mProperties.fullscreen.setValue(JSON.parse(values[0][1])); diff --git a/ide/static/ide/js/ib/codeparser.js b/ide/static/ide/js/ib/codeparser.js index 84cac16e..63484b66 100644 --- a/ide/static/ide/js/ib/codeparser.js +++ b/ide/static/ide/js/ib/codeparser.js @@ -31,14 +31,34 @@ * @private */ _getPropertiesForLayerID: function(id) { + // Matches functions where 'id' is the first argument, and extracts the function name and its other arguments var regex = new RegExp('^\\s*([a-zA-Z_]+)\\s*\\(' + id + ',\\s*(.+)\\);$', 'gm'); + // Splits the remaining arguments by any commas, which aren't followed by closing brackets + var split_regex = /,(?![^,]*\))/g; var groups; var props = Object.create(null); + // Look through the document for any functions whose first arguments are the desired layer ID. while((groups = regex.exec(this._source))) { if(!props[groups[1]]) { props[groups[1]] = []; } - props[groups[1]].push(_.invoke([groups[2]].concat(groups[2].split(',')), 'trim')); + var full_string = groups[2].trim(); + // Extract all function arguments. If any arguments are functions containing more arguments, + // extract the arguments of those functions. + var inner_arguments_regex = /([A-Za-z_]+)\s*\((.*?)\)/g; + var args = _.chain(groups[2].split(split_regex)) + .invoke('trim') + .map(function(argument) { + var inner_group; + if ((inner_group = inner_arguments_regex.exec(argument)) != null) { + return _([inner_group[1]].concat(inner_group[2].split(split_regex))).invoke('trim'); + } + else { + return argument; + } + }).value(); + var prop = [full_string].concat(args); + props[groups[1]].push(prop); } return props; }, diff --git a/ide/static/ide/js/ib/colours.js b/ide/static/ide/js/ib/colours.js new file mode 100644 index 00000000..152fe25d --- /dev/null +++ b/ide/static/ide/js/ib/colours.js @@ -0,0 +1,3332 @@ +(function () { + IB.FullColourDescriptionMap = { + "#AAFFAA": { + "dist": 25.45584412271571, + "closest": { + "url": "http://en.wikipedia.org/wiki/Spring_green_(color)#Mint_green", + "r": 152, + "b": 152, + "name": "Mint green", + "g": 255 + }, + "c_value_identifier": "GColorMintGreenARGB8", + "binary": "0b11101110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorMintGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 255, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAFFAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAFFAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b11, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Mint Green", + "g": 255, + "c_identifier": "GColorMintGreen", + "url": "http://en.wikipedia.org/wiki/Spring_green_(color)#Mint_green", + "html": "#AAFFAA", + "r": 170, + "identifier": "MintGreen" + }, + "#FFAAAA": { + "dist": 20.688160865577203, + "closest": { + "url": "http://en.wikipedia.org/wiki/Variations_of_orange#Melon", + "r": 253, + "b": 180, + "name": "Melon", + "g": 188 + }, + "c_value_identifier": "GColorMelonARGB8", + "binary": "0b11111010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorMelon", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 170, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFAAAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFAAAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b10, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Melon", + "g": 170, + "c_identifier": "GColorMelon", + "url": "http://en.wikipedia.org/wiki/Variations_of_orange#Melon", + "html": "#FFAAAA", + "r": 255, + "identifier": "Melon" + }, + "#FF55FF": { + "dist": 26.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Variations_of_magenta#Ultra_pink", + "r": 255, + "b": 255, + "name": "Shocking pink (Crayola)", + "g": 111 + }, + "c_value_identifier": "GColorShockingPinkARGB8", + "binary": "0b11110111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorShockingPink", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 85, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF55FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF55FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b01, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Shocking Pink (Crayola)", + "g": 85, + "c_identifier": "GColorShockingPink", + "url": "http://en.wikipedia.org/wiki/Variations_of_magenta#Ultra_pink", + "html": "#FF55FF", + "r": 255, + "identifier": "ShockingPink" + }, + "#FF0055": { + "dist": 6.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Crimson#Folly", + "r": 255, + "b": 79, + "name": "Folly", + "g": 0 + }, + "c_value_identifier": "GColorFollyARGB8", + "binary": "0b11110001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorFolly", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 0, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF0055)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF0055", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b00, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Folly", + "g": 0, + "c_identifier": "GColorFolly", + "url": "http://en.wikipedia.org/wiki/Crimson#Folly", + "html": "#FF0055", + "r": 255, + "identifier": "Folly" + }, + "#FF5555": { + "dist": 9.433981132056603, + "closest": { + "url": "http://en.wikipedia.org/wiki/Sunset_(color)#Sunset_orange", + "r": 253, + "b": 83, + "name": "Sunset orange", + "g": 94 + }, + "c_value_identifier": "GColorSunsetOrangeARGB8", + "binary": "0b11110101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorSunsetOrange", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 85, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF5555)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF5555", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b01, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Sunset Orange", + "g": 85, + "c_identifier": "GColorSunsetOrange", + "url": "http://en.wikipedia.org/wiki/Sunset_(color)#Sunset_orange", + "html": "#FF5555", + "r": 255, + "identifier": "SunsetOrange" + }, + "#555500": { + "dist": 33.58571124749333, + "closest": { + "url": "http://en.wikipedia.org/wiki/Army_green", + "r": 75, + "b": 32, + "name": "Army green", + "g": 83 + }, + "c_value_identifier": "GColorArmyGreenARGB8", + "binary": "0b11010100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorArmyGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 85, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x555500)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#555500", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b01, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Army Green", + "g": 85, + "c_identifier": "GColorArmyGreen", + "url": "http://en.wikipedia.org/wiki/Army_green", + "html": "#555500", + "r": 85, + "identifier": "ArmyGreen" + }, + "#0000AA": { + "dist": 14.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Duke_blue", + "r": 0, + "b": 156, + "name": "Duke blue", + "g": 0 + }, + "c_value_identifier": "GColorDukeBlueARGB8", + "binary": "0b11000010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorDukeBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 0, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x0000AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#0000AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b00, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Duke Blue", + "g": 0, + "c_identifier": "GColorDukeBlue", + "url": "http://en.wikipedia.org/wiki/Duke_blue", + "html": "#0000AA", + "r": 0, + "identifier": "DukeBlue" + }, + "#00AAAA": { + "dist": 21.840329667841555, + "closest": { + "url": "http://en.wikipedia.org/wiki/Tiffany_Blue#Tiffany_Blue", + "r": 10, + "b": 181, + "name": "Tiffany Blue", + "g": 186 + }, + "c_value_identifier": "GColorTiffanyBlueARGB8", + "binary": "0b11001010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorTiffanyBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 170, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00AAAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00AAAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b10, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Tiffany Blue", + "g": 170, + "c_identifier": "GColorTiffanyBlue", + "url": "http://en.wikipedia.org/wiki/Tiffany_Blue#Tiffany_Blue", + "html": "#00AAAA", + "r": 0, + "identifier": "TiffanyBlue" + }, + "#55FF55": { + "dist": 49.57822102496216, + "closest": { + "url": "http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors#Standard_colors", + "r": 118, + "b": 122, + "name": "Screamin' Green", + "g": 255 + }, + "c_value_identifier": "GColorScreaminGreenARGB8", + "binary": "0b11011101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorScreaminGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 255, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55FF55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55FF55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b11, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Screamin' Green", + "g": 255, + "c_identifier": "GColorScreaminGreen", + "url": "http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors#Standard_colors", + "html": "#55FF55", + "r": 85, + "identifier": "ScreaminGreen" + }, + "#FFFFAA": { + "dist": 20.199009876724155, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_yellow#Pastel_yellow", + "r": 253, + "b": 150, + "name": "Pastel yellow", + "g": 253 + }, + "c_value_identifier": "GColorPastelYellowARGB8", + "binary": "0b11111110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorPastelYellow", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 255, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFFFAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFFFAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b11, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Pastel Yellow", + "g": 255, + "c_identifier": "GColorPastelYellow", + "url": "http://en.wikipedia.org/wiki/Shades_of_yellow#Pastel_yellow", + "html": "#FFFFAA", + "r": 255, + "identifier": "PastelYellow" + }, + "#FFAAFF": { + "dist": 14.352700094407323, + "closest": { + "url": "http://en.wikipedia.org/wiki/Lavender_(color)#Rich_brilliant_lavender", + "r": 241, + "b": 254, + "name": "Rich brilliant lavender", + "g": 167 + }, + "c_value_identifier": "GColorRichBrilliantLavenderARGB8", + "binary": "0b11111011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorRichBrilliantLavender", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 170, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFAAFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFAAFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b10, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Rich Brilliant Lavender", + "g": 170, + "c_identifier": "GColorRichBrilliantLavender", + "url": "http://en.wikipedia.org/wiki/Lavender_(color)#Rich_brilliant_lavender", + "html": "#FFAAFF", + "r": 255, + "identifier": "RichBrilliantLavender" + }, + "#55FF00": { + "dist": 17.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Bright_green", + "r": 102, + "b": 0, + "name": "Bright green", + "g": 255 + }, + "c_value_identifier": "GColorBrightGreenARGB8", + "binary": "0b11011100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorBrightGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 255, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55FF00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55FF00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b11, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Bright Green", + "g": 255, + "c_identifier": "GColorBrightGreen", + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Bright_green", + "html": "#55FF00", + "r": 85, + "identifier": "BrightGreen" + }, + "#FF55AA": { + "dist": 7.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Rose_(color)#Brilliant_rose", + "r": 255, + "b": 163, + "name": "Brilliant rose", + "g": 85 + }, + "c_value_identifier": "GColorBrilliantRoseARGB8", + "binary": "0b11110110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorBrilliantRose", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 85, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF55AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF55AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b01, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Brilliant Rose", + "g": 85, + "c_identifier": "GColorBrilliantRose", + "url": "http://en.wikipedia.org/wiki/Rose_(color)#Brilliant_rose", + "html": "#FF55AA", + "r": 255, + "identifier": "BrilliantRose" + }, + "#55AAAA": { + "dist": 18.547236990991408, + "closest": { + "url": "http://en.wikipedia.org/wiki/Cadet_grey#Cadet_blue", + "r": 95, + "b": 160, + "name": "Cadet blue", + "g": 158 + }, + "c_value_identifier": "GColorCadetBlueARGB8", + "binary": "0b11011010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorCadetBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 170, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55AAAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55AAAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b10, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Cadet Blue", + "g": 170, + "c_identifier": "GColorCadetBlue", + "url": "http://en.wikipedia.org/wiki/Cadet_grey#Cadet_blue", + "html": "#55AAAA", + "r": 85, + "identifier": "CadetBlue" + }, + "#AA5555": { + "dist": 7.681145747868608, + "closest": { + "url": "http://en.wikipedia.org/wiki/Rose_(color)#Rose_vale", + "r": 171, + "b": 82, + "name": "Rose vale", + "g": 78 + }, + "c_value_identifier": "GColorRoseValeARGB8", + "binary": "0b11100101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorRoseVale", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 85, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA5555)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA5555", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b01, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Rose Vale", + "g": 85, + "c_identifier": "GColorRoseVale", + "url": "http://en.wikipedia.org/wiki/Rose_(color)#Rose_vale", + "html": "#AA5555", + "r": 170, + "identifier": "RoseVale" + }, + "#FF00AA": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Fuchsia_(color)#Fashion_fuchsia", + "r": 255, + "b": 170, + "name": "Fashion Magenta", + "g": 0 + }, + "c_value_identifier": "GColorFashionMagentaARGB8", + "binary": "0b11110010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorFashionMagenta", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 0, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF00AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF00AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b00, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Fashion Magenta", + "g": 0, + "c_identifier": "GColorFashionMagenta", + "url": "http://en.wikipedia.org/wiki/Fuchsia_(color)#Fashion_fuchsia", + "html": "#FF00AA", + "r": 255, + "identifier": "FashionMagenta" + }, + "#00AA55": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/J\u00e4germeister", + "r": 0, + "b": 85, + "name": "Jaeger Green", + "g": 170 + }, + "c_value_identifier": "GColorJaegerGreenARGB8", + "binary": "0b11001001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorJaegerGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 170, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00AA55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00AA55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b10, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Jaeger Green", + "g": 170, + "c_identifier": "GColorJaegerGreen", + "url": "http://en.wikipedia.org/wiki/J\u00e4germeister", + "html": "#00AA55", + "r": 0, + "identifier": "JaegerGreen" + }, + "#AAAAFF": { + "dist": 36.069377593742864, + "closest": { + "url": "http://en.wikipedia.org/wiki/Baby_blue#Baby_blue_eyes", + "r": 161, + "b": 241, + "name": "Baby blue eyes", + "g": 202 + }, + "c_value_identifier": "GColorBabyBlueEyesARGB8", + "binary": "0b11101011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorBabyBlueEyes", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 170, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAAAFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAAAFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b10, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Baby Blue Eyes", + "g": 170, + "c_identifier": "GColorBabyBlueEyes", + "url": "http://en.wikipedia.org/wiki/Baby_blue#Baby_blue_eyes", + "html": "#AAAAFF", + "r": 170, + "identifier": "BabyBlueEyes" + }, + "#AA55AA": { + "dist": 17.916472867168917, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_purple#Purpureus", + "r": 154, + "b": 174, + "name": "Purpureus", + "g": 78 + }, + "c_value_identifier": "GColorPurpureusARGB8", + "binary": "0b11100110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorPurpureus", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 85, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA55AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA55AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b01, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Purpureus", + "g": 85, + "c_identifier": "GColorPurpureus", + "url": "http://en.wikipedia.org/wiki/Shades_of_purple#Purpureus", + "html": "#AA55AA", + "r": 170, + "identifier": "Purpureus" + }, + "#FFAA00": { + "dist": 3.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Chrome_yellow", + "r": 255, + "b": 0, + "name": "Chrome yellow", + "g": 167 + }, + "c_value_identifier": "GColorChromeYellowARGB8", + "binary": "0b11111000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorChromeYellow", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 170, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFAA00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFAA00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b10, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Chrome Yellow", + "g": 170, + "c_identifier": "GColorChromeYellow", + "url": "http://en.wikipedia.org/wiki/Chrome_yellow", + "html": "#FFAA00", + "r": 255, + "identifier": "ChromeYellow" + }, + "#005500": { + "dist": 15.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Dark_green_.28X11.29", + "r": 0, + "b": 0, + "name": "Dark green (X11)", + "g": 100 + }, + "c_value_identifier": "GColorDarkGreenARGB8", + "binary": "0b11000100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorDarkGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 85, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x005500)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#005500", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b01, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Dark Green (X11)", + "g": 85, + "c_identifier": "GColorDarkGreen", + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Dark_green_.28X11.29", + "html": "#005500", + "r": 0, + "identifier": "DarkGreen" + }, + "#FF0000": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Red", + "r": 255, + "b": 0, + "name": "Red", + "g": 0 + }, + "c_value_identifier": "GColorRedARGB8", + "binary": "0b11110000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorRed", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 0, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF0000)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF0000", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b00, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Red", + "g": 0, + "c_identifier": "GColorRed", + "url": "http://en.wikipedia.org/wiki/Red", + "html": "#FF0000", + "r": 255, + "identifier": "Red" + }, + "#5555AA": { + "dist": 5.916079783099616, + "closest": { + "url": "http://en.wikipedia.org/wiki/Variations_of_blue#Liberty", + "r": 84, + "b": 167, + "name": "Liberty", + "g": 90 + }, + "c_value_identifier": "GColorLibertyARGB8", + "binary": "0b11010110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorLiberty", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 85, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x5555AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#5555AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b01, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Liberty", + "g": 85, + "c_identifier": "GColorLiberty", + "url": "http://en.wikipedia.org/wiki/Variations_of_blue#Liberty", + "html": "#5555AA", + "r": 85, + "identifier": "Liberty" + }, + "#AAAAAA": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_gray#Light_gray", + "r": 170, + "b": 170, + "name": "Light Gray", + "g": 170 + }, + "c_value_identifier": "GColorLightGrayARGB8", + "binary": "0b11101010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorLightGray", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 170, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAAAAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAAAAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b10, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Light Gray", + "g": 170, + "c_identifier": "GColorLightGray", + "url": "http://en.wikipedia.org/wiki/Shades_of_gray#Light_gray", + "html": "#AAAAAA", + "r": 170, + "identifier": "LightGray" + }, + "#AA00FF": { + "dist": 11.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_violet#Vivid_violet", + "r": 159, + "b": 255, + "name": "Vivid violet", + "g": 0 + }, + "c_value_identifier": "GColorVividVioletARGB8", + "binary": "0b11100011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorVividViolet", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 0, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA00FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA00FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b00, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Vivid Violet", + "g": 0, + "c_identifier": "GColorVividViolet", + "url": "http://en.wikipedia.org/wiki/Shades_of_violet#Vivid_violet", + "html": "#AA00FF", + "r": 170, + "identifier": "VividViolet" + }, + "#FFAA55": { + "dist": 11.74734012447073, + "closest": { + "url": "http://en.wikipedia.org/wiki/Saffron_(color)#Rajah", + "r": 251, + "b": 96, + "name": "Rajah", + "g": 171 + }, + "c_value_identifier": "GColorRajahARGB8", + "binary": "0b11111001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorRajah", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 170, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFAA55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFAA55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b10, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Rajah", + "g": 170, + "c_identifier": "GColorRajah", + "url": "http://en.wikipedia.org/wiki/Saffron_(color)#Rajah", + "html": "#FFAA55", + "r": 255, + "identifier": "Rajah" + }, + "#5500AA": { + "dist": 41.23105625617661, + "closest": { + "url": "http://en.wikipedia.org/wiki/Indigo#Pigment_indigo_.28web_color_indigo.29", + "r": 75, + "b": 130, + "name": "Indigo (web)", + "g": 0 + }, + "c_value_identifier": "GColorIndigoARGB8", + "binary": "0b11010010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorIndigo", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 0, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x5500AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#5500AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b00, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Indigo (Web)", + "g": 0, + "c_identifier": "GColorIndigo", + "url": "http://en.wikipedia.org/wiki/Indigo#Pigment_indigo_.28web_color_indigo.29", + "html": "#5500AA", + "r": 85, + "identifier": "Indigo" + }, + "#55AA55": { + "dist": 33.25657829663178, + "closest": { + "url": "http://en.wikipedia.org/wiki/Spring_bud#May_green", + "r": 76, + "b": 65, + "name": "May green", + "g": 145 + }, + "c_value_identifier": "GColorMayGreenARGB8", + "binary": "0b11011001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorMayGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 170, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55AA55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55AA55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b10, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "May Green", + "g": 170, + "c_identifier": "GColorMayGreen", + "url": "http://en.wikipedia.org/wiki/Spring_bud#May_green", + "html": "#55AA55", + "r": 85, + "identifier": "MayGreen" + }, + "#FFFF55": { + "dist": 12.409673645990857, + "closest": { + "url": "http://en.wikipedia.org/wiki/Icterine", + "r": 252, + "b": 94, + "name": "Icterine", + "g": 247 + }, + "c_value_identifier": "GColorIcterineARGB8", + "binary": "0b11111101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorIcterine", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 255, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFFF55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFFF55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b11, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Icterine", + "g": 255, + "c_identifier": "GColorIcterine", + "url": "http://en.wikipedia.org/wiki/Icterine", + "html": "#FFFF55", + "r": 255, + "identifier": "Icterine" + }, + "#550000": { + "dist": 15.937377450509228, + "closest": { + "url": "http://en.wikipedia.org/wiki/Rose_(color)#Bulgarian_Rose", + "r": 72, + "b": 7, + "name": "Bulgarian rose", + "g": 6 + }, + "c_value_identifier": "GColorBulgarianRoseARGB8", + "binary": "0b11010000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorBulgarianRose", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 0, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x550000)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#550000", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b00, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Bulgarian Rose", + "g": 0, + "c_identifier": "GColorBulgarianRose", + "url": "http://en.wikipedia.org/wiki/Rose_(color)#Bulgarian_Rose", + "html": "#550000", + "r": 85, + "identifier": "BulgarianRose" + }, + "#FF5500": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Orange_(colour)", + "r": 255, + "b": 0, + "name": "Orange", + "g": 85 + }, + "c_value_identifier": "GColorOrangeARGB8", + "binary": "0b11110100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorOrange", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 85, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF5500)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF5500", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b01, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Orange", + "g": 85, + "c_identifier": "GColorOrange", + "url": "http://en.wikipedia.org/wiki/Orange_(colour)", + "html": "#FF5500", + "r": 255, + "identifier": "Orange" + }, + "#00FF00": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Green", + "r": 0, + "b": 0, + "name": "Green", + "g": 255 + }, + "c_value_identifier": "GColorGreenARGB8", + "binary": "0b11001100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 255, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00FF00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00FF00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b11, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Green", + "g": 255, + "c_identifier": "GColorGreen", + "url": "http://en.wikipedia.org/wiki/Green", + "html": "#00FF00", + "r": 0, + "identifier": "Green" + }, + "#AA5500": { + "dist": 3.605551275463989, + "closest": { + "url": "http://en.wikipedia.org/wiki/Tan_(color)#Windsor_tan", + "r": 167, + "b": 2, + "name": "Windsor tan", + "g": 85 + }, + "c_value_identifier": "GColorWindsorTanARGB8", + "binary": "0b11100100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorWindsorTan", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 85, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA5500)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA5500", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b01, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Windsor Tan", + "g": 85, + "c_identifier": "GColorWindsorTan", + "url": "http://en.wikipedia.org/wiki/Tan_(color)#Windsor_tan", + "html": "#AA5500", + "r": 170, + "identifier": "WindsorTan" + }, + "#AA55FF": { + "dist": 29.79932885150268, + "closest": { + "url": "http://en.wikipedia.org/wiki/Lavender_(color)#Lavender_indigo", + "r": 148, + "b": 235, + "name": "Lavender indigo", + "g": 87 + }, + "c_value_identifier": "GColorLavenderIndigoARGB8", + "binary": "0b11100111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorLavenderIndigo", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 85, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA55FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA55FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b01, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Lavender Indigo", + "g": 85, + "c_identifier": "GColorLavenderIndigo", + "url": "http://en.wikipedia.org/wiki/Lavender_(color)#Lavender_indigo", + "html": "#AA55FF", + "r": 170, + "identifier": "LavenderIndigo" + }, + "#555555": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_gray#Dark_medium_gray_.28dark_gray_.28X11.29.29", + "r": 85, + "b": 85, + "name": "Dark Gray", + "g": 85 + }, + "c_value_identifier": "GColorDarkGrayARGB8", + "binary": "0b11010101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorDarkGray", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 85, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x555555)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#555555", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b01, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Dark Gray", + "g": 85, + "c_identifier": "GColorDarkGray", + "url": "http://en.wikipedia.org/wiki/Shades_of_gray#Dark_medium_gray_.28dark_gray_.28X11.29.29", + "html": "#555555", + "r": 85, + "identifier": "DarkGray" + }, + "#55FFFF": { + "dist": 40.44749683231337, + "closest": { + "url": "http://en.wikipedia.org/wiki/Electric_blue_(color)", + "r": 125, + "b": 255, + "name": "Electric blue", + "g": 249 + }, + "c_value_identifier": "GColorElectricBlueARGB8", + "binary": "0b11011111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorElectricBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 255, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55FFFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55FFFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b11, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Electric Blue", + "g": 255, + "c_identifier": "GColorElectricBlue", + "url": "http://en.wikipedia.org/wiki/Electric_blue_(color)", + "html": "#55FFFF", + "r": 85, + "identifier": "ElectricBlue" + }, + "#0055FF": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Blue_Moon_(beer)", + "r": 0, + "b": 255, + "name": "Blue Moon", + "g": 85 + }, + "c_value_identifier": "GColorBlueMoonARGB8", + "binary": "0b11000111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorBlueMoon", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 85, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x0055FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#0055FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b01, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Blue Moon", + "g": 85, + "c_identifier": "GColorBlueMoon", + "url": "http://en.wikipedia.org/wiki/Blue_Moon_(beer)", + "html": "#0055FF", + "r": 0, + "identifier": "BlueMoon" + }, + "#00FFFF": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Cyan", + "r": 0, + "b": 255, + "name": "Cyan", + "g": 255 + }, + "c_value_identifier": "GColorCyanARGB8", + "binary": "0b11001111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorCyan", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 255, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00FFFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00FFFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b11, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Cyan", + "g": 255, + "c_identifier": "GColorCyan", + "url": "http://en.wikipedia.org/wiki/Cyan", + "html": "#00FFFF", + "r": 0, + "identifier": "Cyan" + }, + "#000000": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Black", + "r": 0, + "b": 0, + "name": "Black", + "g": 0 + }, + "c_value_identifier": "GColorBlackARGB8", + "binary": "0b11000000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorBlack", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 0, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x000000)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#000000", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b00, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Black", + "g": 0, + "c_identifier": "GColorBlack", + "url": "http://en.wikipedia.org/wiki/Black", + "html": "#000000", + "r": 0, + "identifier": "Black" + }, + "#55FFAA": { + "dist": 38.01315561749642, + "closest": { + "url": "http://en.wikipedia.org/wiki/Aquamarine_(color)#Medium_aquamarine", + "r": 102, + "b": 170, + "name": "Medium aquamarine", + "g": 221 + }, + "c_value_identifier": "GColorMediumAquamarineARGB8", + "binary": "0b11011110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorMediumAquamarine", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 255, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55FFAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55FFAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b11, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Medium Aquamarine", + "g": 255, + "c_identifier": "GColorMediumAquamarine", + "url": "http://en.wikipedia.org/wiki/Aquamarine_(color)#Medium_aquamarine", + "html": "#55FFAA", + "r": 85, + "identifier": "MediumAquamarine" + }, + "#AA0000": { + "dist": 6.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Candy_apple_red_(color)#Dark_candy_apple_red", + "r": 164, + "b": 0, + "name": "Dark candy apple red", + "g": 0 + }, + "c_value_identifier": "GColorDarkCandyAppleRedARGB8", + "binary": "0b11100000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorDarkCandyAppleRed", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 0, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA0000)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA0000", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b00, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Dark Candy Apple Red", + "g": 0, + "c_identifier": "GColorDarkCandyAppleRed", + "url": "http://en.wikipedia.org/wiki/Candy_apple_red_(color)#Dark_candy_apple_red", + "html": "#AA0000", + "r": 170, + "identifier": "DarkCandyAppleRed" + }, + "#AAAA00": { + "dist": 28.74021572639983, + "closest": { + "url": "http://en.wikipedia.org/wiki/Chartreuse_(color)#Limerick", + "r": 157, + "b": 9, + "name": "Limerick", + "g": 194 + }, + "c_value_identifier": "GColorLimerickARGB8", + "binary": "0b11101000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorLimerick", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 170, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAAA00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAAA00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b10, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Limerick", + "g": 170, + "c_identifier": "GColorLimerick", + "url": "http://en.wikipedia.org/wiki/Chartreuse_(color)#Limerick", + "html": "#AAAA00", + "r": 170, + "identifier": "Limerick" + }, + "#0055AA": { + "dist": 14.035668847618199, + "closest": { + "url": "http://en.wikipedia.org/wiki/Cobalt_blue", + "r": 0, + "b": 171, + "name": "Cobalt Blue", + "g": 71 + }, + "c_value_identifier": "GColorCobaltBlueARGB8", + "binary": "0b11000110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorCobaltBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 85, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x0055AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#0055AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b01, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Cobalt Blue", + "g": 85, + "c_identifier": "GColorCobaltBlue", + "url": "http://en.wikipedia.org/wiki/Cobalt_blue", + "html": "#0055AA", + "r": 0, + "identifier": "CobaltBlue" + }, + "#AAFFFF": { + "dist": 8.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Sky_Blue#Celeste", + "r": 178, + "b": 255, + "name": "Celeste", + "g": 255 + }, + "c_value_identifier": "GColorCelesteARGB8", + "binary": "0b11101111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorCeleste", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 255, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAFFFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAFFFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b11, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Celeste", + "g": 255, + "c_identifier": "GColorCeleste", + "url": "http://en.wikipedia.org/wiki/Sky_Blue#Celeste", + "html": "#AAFFFF", + "r": 170, + "identifier": "Celeste" + }, + "#5500FF": { + "dist": 22.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Ultramarine#Electric_ultramarine", + "r": 63, + "b": 255, + "name": "Electric ultramarine", + "g": 0 + }, + "c_value_identifier": "GColorElectricUltramarineARGB8", + "binary": "0b11010011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorElectricUltramarine", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 0, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x5500FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#5500FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b00, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Electric Ultramarine", + "g": 0, + "c_identifier": "GColorElectricUltramarine", + "url": "http://en.wikipedia.org/wiki/Ultramarine#Electric_ultramarine", + "html": "#5500FF", + "r": 85, + "identifier": "ElectricUltramarine" + }, + "#55AAFF": { + "dist": 28.879058156387302, + "closest": { + "url": "http://en.wikipedia.org/wiki/Azure_(color)#Picton_blue", + "r": 69, + "b": 232, + "name": "Picton blue", + "g": 177 + }, + "c_value_identifier": "GColorPictonBlueARGB8", + "binary": "0b11011011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorPictonBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 170, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55AAFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55AAFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b10, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Picton Blue", + "g": 170, + "c_identifier": "GColorPictonBlue", + "url": "http://en.wikipedia.org/wiki/Azure_(color)#Picton_blue", + "html": "#55AAFF", + "r": 85, + "identifier": "PictonBlue" + }, + "#AAFF55": { + "dist": 22.11334438749598, + "closest": { + "url": "http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors#Standard_colors", + "r": 178, + "b": 93, + "name": "Inchworm", + "g": 236 + }, + "c_value_identifier": "GColorInchwormARGB8", + "binary": "0b11101101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorInchworm", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 255, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAFF55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAFF55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b11, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Inchworm", + "g": 255, + "c_identifier": "GColorInchworm", + "url": "http://en.wikipedia.org/wiki/List_of_Crayola_crayon_colors#Standard_colors", + "html": "#AAFF55", + "r": 170, + "identifier": "Inchworm" + }, + "#0000FF": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Blue", + "r": 0, + "b": 255, + "name": "Blue", + "g": 0 + }, + "c_value_identifier": "GColorBlueARGB8", + "binary": "0b11000011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 0, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x0000FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#0000FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b00, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Blue", + "g": 0, + "c_identifier": "GColorBlue", + "url": "http://en.wikipedia.org/wiki/Blue", + "html": "#0000FF", + "r": 0, + "identifier": "Blue" + }, + "#00AAFF": { + "dist": 17.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Cerulean", + "r": 0, + "b": 238, + "name": "Vivid cerulean", + "g": 170 + }, + "c_value_identifier": "GColorVividCeruleanARGB8", + "binary": "0b11001011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorVividCerulean", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 170, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00AAFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00AAFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b10, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Vivid Cerulean", + "g": 170, + "c_identifier": "GColorVividCerulean", + "url": "http://en.wikipedia.org/wiki/Cerulean", + "html": "#00AAFF", + "r": 0, + "identifier": "VividCerulean" + }, + "#AA00AA": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Purple", + "r": 170, + "b": 170, + "name": "Purple", + "g": 0 + }, + "c_value_identifier": "GColorPurpleARGB8", + "binary": "0b11100010", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorPurple", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 0, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA00AA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA00AA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100010}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b00, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Purple", + "g": 0, + "c_identifier": "GColorPurple", + "url": "http://en.wikipedia.org/wiki/Purple", + "html": "#AA00AA", + "r": 170, + "identifier": "Purple" + }, + "#55AA00": { + "dist": 29.9833287011299, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Kelly_green", + "r": 76, + "b": 23, + "name": "Kelly green", + "g": 187 + }, + "c_value_identifier": "GColorKellyGreenARGB8", + "binary": "0b11011000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorKellyGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 170, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x55AA00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#55AA00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11011000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b10, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Kelly Green", + "g": 170, + "c_identifier": "GColorKellyGreen", + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Kelly_green", + "html": "#55AA00", + "r": 85, + "identifier": "KellyGreen" + }, + "#00FF55": { + "dist": 38.80721582386451, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Malachite", + "r": 11, + "b": 81, + "name": "Malachite", + "g": 218 + }, + "c_value_identifier": "GColorMalachiteARGB8", + "binary": "0b11001101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorMalachite", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 255, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00FF55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00FF55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b11, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Malachite", + "g": 255, + "c_identifier": "GColorMalachite", + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Malachite", + "html": "#00FF55", + "r": 0, + "identifier": "Malachite" + }, + "#005555": { + "dist": 12.165525060596439, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Midnight_green", + "r": 0, + "b": 83, + "name": "Midnight green (eagle green)", + "g": 73 + }, + "c_value_identifier": "GColorMidnightGreenARGB8", + "binary": "0b11000101", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorMidnightGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 85, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x005555)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#005555", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000101}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b01, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Midnight Green (Eagle Green)", + "g": 85, + "c_identifier": "GColorMidnightGreen", + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Midnight_green", + "html": "#005555", + "r": 0, + "identifier": "MidnightGreen" + }, + "#FFFF00": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Yellow", + "r": 255, + "b": 0, + "name": "Yellow", + "g": 255 + }, + "c_value_identifier": "GColorYellowARGB8", + "binary": "0b11111100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorYellow", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 255, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFFF00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFFF00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b11, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Yellow", + "g": 255, + "c_identifier": "GColorYellow", + "url": "http://en.wikipedia.org/wiki/Yellow", + "html": "#FFFF00", + "r": 255, + "identifier": "Yellow" + }, + "#FF00FF": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Magenta", + "r": 255, + "b": 255, + "name": "Magenta", + "g": 0 + }, + "c_value_identifier": "GColorMagentaARGB8", + "binary": "0b11110011", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorMagenta", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 0, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFF00FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FF00FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11110011}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b00, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Magenta", + "g": 0, + "c_identifier": "GColorMagenta", + "url": "http://en.wikipedia.org/wiki/Magenta", + "html": "#FF00FF", + "r": 255, + "identifier": "Magenta" + }, + "#AAFF00": { + "dist": 4.242640687119285, + "closest": { + "url": "http://en.wikipedia.org/wiki/Spring_bud", + "r": 167, + "b": 0, + "name": "Spring bud", + "g": 252 + }, + "c_value_identifier": "GColorSpringBudARGB8", + "binary": "0b11101100", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorSpringBud", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 255, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAFF00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAFF00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101100}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b11, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Spring Bud", + "g": 255, + "c_identifier": "GColorSpringBud", + "url": "http://en.wikipedia.org/wiki/Spring_bud", + "html": "#AAFF00", + "r": 170, + "identifier": "SpringBud" + }, + "#AA0055": { + "dist": 15.066519173319364, + "closest": { + "url": "http://en.wikipedia.org/wiki/Red-violet#Jazzberry_jam", + "r": 165, + "b": 94, + "name": "Jazzberry jam", + "g": 11 + }, + "c_value_identifier": "GColorJazzberryJamARGB8", + "binary": "0b11100001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorJazzberryJam", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 0, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAA0055)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AA0055", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11100001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b00, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Jazzberry Jam", + "g": 0, + "c_identifier": "GColorJazzberryJam", + "url": "http://en.wikipedia.org/wiki/Red-violet#Jazzberry_jam", + "html": "#AA0055", + "r": 170, + "identifier": "JazzberryJam" + }, + "#5555FF": { + "dist": 24.041630560342615, + "closest": { + "url": "http://en.wikipedia.org/wiki/Light_blue", + "r": 102, + "b": 255, + "name": "Very light blue", + "g": 102 + }, + "c_value_identifier": "GColorVeryLightBlueARGB8", + "binary": "0b11010111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorVeryLightBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 85, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x5555FF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#5555FF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b01, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "Very Light Blue", + "g": 85, + "c_identifier": "GColorVeryLightBlue", + "url": "http://en.wikipedia.org/wiki/Light_blue", + "html": "#5555FF", + "r": 85, + "identifier": "VeryLightBlue" + }, + "#FFFFFF": { + "dist": 0.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/White", + "r": 255, + "b": 255, + "name": "White", + "g": 255 + }, + "c_value_identifier": "GColorWhiteARGB8", + "binary": "0b11111111", + "b": 255, + "literals": [ + { + "id": "define", + "value": "GColorWhite", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(255, 255, 255)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xFFFFFF)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#FFFFFF", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11111111}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b11, .g=0b11, .b=0b11}", + "description": "GColor (components)" + } + ], + "name": "White", + "g": 255, + "c_identifier": "GColorWhite", + "url": "http://en.wikipedia.org/wiki/White", + "html": "#FFFFFF", + "r": 255, + "identifier": "White" + }, + "#00AA00": { + "dist": 26.0, + "closest": { + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Islamic_green", + "r": 0, + "b": 0, + "name": "Islamic green", + "g": 144 + }, + "c_value_identifier": "GColorIslamicGreenARGB8", + "binary": "0b11001000", + "b": 0, + "literals": [ + { + "id": "define", + "value": "GColorIslamicGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 170, 0)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00AA00)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00AA00", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001000}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b10, .b=0b00}", + "description": "GColor (components)" + } + ], + "name": "Islamic Green", + "g": 170, + "c_identifier": "GColorIslamicGreen", + "url": "http://en.wikipedia.org/wiki/Shades_of_green#Islamic_green", + "html": "#00AA00", + "r": 0, + "identifier": "IslamicGreen" + }, + "#000055": { + "dist": 35.84689665786984, + "closest": { + "url": "http://en.wikipedia.org/wiki/Oxford_University", + "r": 0, + "b": 71, + "name": "Oxford Blue", + "g": 33 + }, + "c_value_identifier": "GColorOxfordBlueARGB8", + "binary": "0b11000001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorOxfordBlue", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 0, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x000055)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#000055", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11000001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b00, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Oxford Blue", + "g": 0, + "c_identifier": "GColorOxfordBlue", + "url": "http://en.wikipedia.org/wiki/Oxford_University", + "html": "#000055", + "r": 0, + "identifier": "OxfordBlue" + }, + "#550055": { + "dist": 30.298514815086232, + "closest": { + "url": "http://en.wikipedia.org/wiki/Purple#Tyrian_purple:_Classical_antiquity", + "r": 102, + "b": 60, + "name": "Imperial purple", + "g": 2 + }, + "c_value_identifier": "GColorImperialPurpleARGB8", + "binary": "0b11010001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorImperialPurple", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(85, 0, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x550055)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#550055", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11010001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b01, .g=0b00, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Imperial Purple", + "g": 0, + "c_identifier": "GColorImperialPurple", + "url": "http://en.wikipedia.org/wiki/Purple#Tyrian_purple:_Classical_antiquity", + "html": "#550055", + "r": 85, + "identifier": "ImperialPurple" + }, + "#AAAA55": { + "dist": 22.315913604421397, + "closest": { + "url": "http://en.wikipedia.org/wiki/Brass", + "r": 181, + "b": 66, + "name": "Brass", + "g": 166 + }, + "c_value_identifier": "GColorBrassARGB8", + "binary": "0b11101001", + "b": 85, + "literals": [ + { + "id": "define", + "value": "GColorBrass", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(170, 170, 85)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0xAAAA55)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#AAAA55", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11101001}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b10, .g=0b10, .b=0b01}", + "description": "GColor (components)" + } + ], + "name": "Brass", + "g": 170, + "c_identifier": "GColorBrass", + "url": "http://en.wikipedia.org/wiki/Brass", + "html": "#AAAA55", + "r": 170, + "identifier": "Brass" + }, + "#00FFAA": { + "dist": 16.76305461424021, + "closest": { + "url": "http://en.wikipedia.org/wiki/Spring_green_(color)#Medium_spring_green", + "r": 0, + "b": 154, + "name": "Medium spring green", + "g": 250 + }, + "c_value_identifier": "GColorMediumSpringGreenARGB8", + "binary": "0b11001110", + "b": 170, + "literals": [ + { + "id": "define", + "value": "GColorMediumSpringGreen", + "description": "SDK Constant" + }, + { + "id": "rgb", + "value": "GColorFromRGB(0, 255, 170)", + "description": "Code (RGB)" + }, + { + "id": "hex", + "value": "GColorFromHEX(0x00FFAA)", + "description": "Code (Hex)" + }, + { + "id": "html", + "value": "#00FFAA", + "description": "HTML code" + }, + { + "id": "gcolor_argb", + "value": "(GColor){.argb=0b11001110}", + "description": "GColor (argb)" + }, + { + "id": "gcolor_fields", + "value": "(GColor){.a=0b11, .r=0b00, .g=0b11, .b=0b10}", + "description": "GColor (components)" + } + ], + "name": "Medium Spring Green", + "g": 255, + "c_identifier": "GColorMediumSpringGreen", + "url": "http://en.wikipedia.org/wiki/Spring_green_(color)#Medium_spring_green", + "html": "#00FFAA", + "r": 0, + "identifier": "MediumSpringGreen" + } + }; +})(); \ No newline at end of file diff --git a/ide/static/ide/js/ib/layers/actionbarlayer.js b/ide/static/ide/js/ib/layers/actionbarlayer.js index 7761444a..33da06e2 100644 --- a/ide/static/ide/js/ib/layers/actionbarlayer.js +++ b/ide/static/ide/js/ib/layers/actionbarlayer.js @@ -48,7 +48,8 @@ this._node.css({ 'background-color': this._backgroundColour.getValue().css }); - var invertIcons = (this._backgroundColour.getValue() != IB.ColourWhite); + // TODO: Figure out which colours to invert the layer for. + var invertIcons = (!this._backgroundColour.fullyEquals(IB.ColourWhite)); _.each(this._icon_nodes, function(node, it) { if(invertIcons) { node.addClass('ib-invert'); @@ -71,9 +72,10 @@ this._ID + " = action_bar_layer_create();", "action_bar_layer_add_to_window(" + this._ID + ", s_window);" ]; - if(this._backgroundColour != IB.ColourBlack) { + + if(!this._backgroundColour.fullyEquals(IB.ColourBlack)) { init.push("action_bar_layer_set_background_color(" - + this._ID + ", " + this._backgroundColour.getValue().name + ");"); + + this._ID + ", " + this._backgroundColour.generateCode() + ");"); } _.each(BUTTONS, function(it) { var icon = this._icons[it].getValue(); @@ -93,7 +95,7 @@ _.each(properties, function(values, property) { switch(property) { case "action_bar_layer_set_background_color": - this._backgroundColour.setValue(IB.ColourMap[values[0][1]]); + this._backgroundColour.setValue(values[0][1]); break; case "action_bar_layer_set_icon": _.each(values, function(group) { diff --git a/ide/static/ide/js/ib/layers/bitmaplayer.js b/ide/static/ide/js/ib/layers/bitmaplayer.js index e4815142..57db6e48 100644 --- a/ide/static/ide/js/ib/layers/bitmaplayer.js +++ b/ide/static/ide/js/ib/layers/bitmaplayer.js @@ -64,8 +64,8 @@ if(this._resource.getValue()) { init.push("bitmap_layer_set_bitmap(" + this._ID + ", " + this._canvas.getResources().getResource(this._resource.getValue()) + ");"); } - if(this._bg_colour.getValue() != IB.ColourClear) { - init.push("bitmap_layer_set_background_color(" + this._ID + ", " + this._bg_colour.getValue().name + ");"); + if(!this._bg_colour.fullyEquals(IB.ColourClear)) { + init.push("bitmap_layer_set_background_color(" + this._ID + ", " + this._bg_colour.generateCode() + ");"); } return init; }, @@ -73,11 +73,12 @@ return ["bitmap_layer_destroy(" + this._ID + ");"]; }, readProperties: function(properties, mappings) { + console.log("Setting properties", properties, mappings); IB.Layer.prototype.readProperties.call(this, properties); _.each(properties, function(values, property) { switch(property) { case "bitmap_layer_set_background_color": - this.setBackgroundColour(IB.ColourMap[values[0][1]]); + this.setBackgroundColour(values[0][1]); break; case "bitmap_layer_set_bitmap": if(mappings[values[0][1]]) { diff --git a/ide/static/ide/js/ib/layers/inverterlayer.js b/ide/static/ide/js/ib/layers/inverterlayer.js index 6fc69889..cf474979 100644 --- a/ide/static/ide/js/ib/layers/inverterlayer.js +++ b/ide/static/ide/js/ib/layers/inverterlayer.js @@ -14,6 +14,7 @@ IB.InverterLayer.className = 'InverterLayer'; IB.InverterLayer.prototype = Object.create(IB.Layer.prototype); IB.InverterLayer.description = gettext("Inverts the colours of the rectangle behind it. Layers in front are unaffected."); + IB.InverterLayer.allowedSDKs = [2]; _.extend(IB.InverterLayer.prototype, { constructor: IB.InverterLayer, // Rendering works by duplicating all layers *below* the current layer as children of our node, diff --git a/ide/static/ide/js/ib/layers/textlayer.js b/ide/static/ide/js/ib/layers/textlayer.js index 9afb9c3e..daca7e30 100644 --- a/ide/static/ide/js/ib/layers/textlayer.js +++ b/ide/static/ide/js/ib/layers/textlayer.js @@ -73,11 +73,11 @@ }, generateInitialiser: function() { var init = [this._ID + " = text_layer_create(" + this.generateRect() + ");"]; - if(this._backgroundColour.getValue() != IB.ColourWhite) { - init.push("text_layer_set_background_color(" + this._ID + ", " + this._backgroundColour.getValue().name + ");"); + if(!this._backgroundColour.fullyEquals(IB.ColourWhite)) { + init.push("text_layer_set_background_color(" + this._ID + ", " + this._backgroundColour.generateCode() + ");"); } - if(this._textColour.getValue() != IB.ColourBlack) { - init.push("text_layer_set_text_color(" + this._ID + ", " + this._textColour.getValue().name + ");"); + if(!this._textColour.fullyEquals(IB.ColourBlack)) { + init.push("text_layer_set_text_color(" + this._ID + ", " + this._textColour.generateCode() + ");"); } if(this._text.getValue() != "") { init.push("text_layer_set_text(" + this._ID + ", \"" + IB.escapeCString(this.getText()) + "\");"); @@ -98,10 +98,10 @@ _.each(properties, function(values, property) { switch(property) { case "text_layer_set_background_color": - this.setBackgroundColour(IB.ColourMap[values[0][1]]); + this.setBackgroundColour(values[0][1]); break; case "text_layer_set_text_color": - this.setTextColour(IB.ColourMap[values[0][1]]); + this.setTextColour(values[0][1]); break; case "text_layer_set_text": this.setText(JSON.parse(values[0][0])); diff --git a/ide/static/ide/js/ib/properties.js b/ide/static/ide/js/ib/properties.js index 6929566f..c4f1f308 100644 --- a/ide/static/ide/js/ib/properties.js +++ b/ide/static/ide/js/ib/properties.js @@ -195,16 +195,57 @@ IB.Properties.Colour.prototype.constructor = IB.Properties.Colour; _.extend(IB.Properties.Colour.prototype, { setValue: function(value) { + if (_.isString(value)) { + value = IB.ColourMap[value]; + } + else if (_.isArray(value)) { + if (value[0] == "COLOR_FALLBACK") { + value = _.map(value.slice(1), function(c) { + return IB.ColourMap[c]; + }); + } + } + else { // Assume value is a Colour object + value = [value, value]; + } _super.setValue.call(this, value); - this._node.val(this._value.name); + this._color_node.val(this._value[0].name); + this._bw_node.val(this._value[1].name); + }, + getValue: function(index) { + var value = _super.getValue.call(this); + return (_.isArray(value) ? (_.isFinite(index) ? value[index] : value[IB.ColourMode]) : value); + }, + fullyEquals: function(colour) { + return (this._value[0] == colour && this._value[1] == colour); + }, + generateCode: function() { + if (this._value[0] !== this._value[1]) { + return interpolate("COLOR_FALLBACK(%s, %s)", [this._value[0].name, this._value[1].name]); + } + else { + return this._value[0].name; + } }, _generateNode: function() { - return $('') + .append(colour_options) + .val(this._value.name) + .change(_.bind(this._handleChange, this)); + this._color_node.appendTo("").parent().appendTo(tr); + this._bw_node = $('') - .append(colour_options) - .val(this._value.name) - .change(_.bind(this._handleChange, this)); - this._color_node.appendTo("").parent().appendTo(tr); + var td = $("").appendTo(tr); + var div = $('
').appendTo(td); + this._color_node = $('') + .change(_.bind(this._handleChange, this)) + .appendTo(div); + this._bw_node = $('' + + interpolate('', [(isColour ? 'selected' : ''), gettext("Colour")]) + + interpolate('', [(isColour ? '' : 'selected'), gettext("Monochrome")]) + + '').attr('id', 'ib-setting-colourmode'); + node.change(_.bind(this.handleChange, parent)); + return node; + }, + handleChange: function (evt) { + IB.ColourMode = parseInt(evt.target.value, 10); + this.trigger('refresh'); + } + }; + + /** + * Settings view that shows renders a global settings form in to a given parent node + * @param parent + * @param canvas + * @constructor + */ + IB.SettingsForm = function (parent, ib) { + this._ib = ib; + this._parent = parent; + this._formNode = null; + _.extend(this, Backbone.Events); + }; + IB.SettingsForm.prototype = { + /** + * Renders the form into the parent node. + */ + render: function () { + if (!this._formNode) { + this._formNode = $('
') + .appendTo(this._parent); + } + + var form = this._formNode; + form.empty(); + + _.each(IB.Settings, function (setting, name) { + form.append(this._generateControlGroup(setting)); + }, this); + }, + /** + * Empties the contents of the parent node + */ + empty: function() { + this._parent.empty(); + }, + /** + * Generates a row for a single setting. + * @param {IB.Property} setting The setting to render + * @returns {jQuery} An HTML element suitable for inserting into the view + * @private + */ + _generateControlGroup: function (setting) { + // Here we assume bootstrap magic... mostly because it's convenient. + return $('
') + .append( + $('