{"ScriptPreparationCode":"function colorShade1(color, amount) {\r\n let [r, g, b] = color.length === 3 ?\r\n color.split(\u0027\u0027).map((str) =\u003E Number.parseInt(str \u002B str, 16) \u002B amount)\r\n : color.match(/.{2}/g).map((str) =\u003E Number.parseInt(str, 16) \u002B amount);\r\n}\r\n\r\nfunction colorShade2(color, amount) { \r\n if (color.length === 3) color = color[0] \u002B color[0] \u002B color[1] \u002B color[1] \u002B color[2] \u002B color[2];\r\n \r\n \t// Get r,g,b as numbers and with amount applied\r\n \tlet r = Number.parseInt(color.substring(0,2), 16) \u002B amount;\r\n \tlet g = Number.parseInt(color.substring(2,4), 16) \u002B amount;\r\n \tlet b = Number.parseInt(color.substring(4,6), 16) \u002B amount;\r\n}","TestCases":[{"Name":"shade1_3","Code":"colorShade1(\u0027AEF\u0027, 10);","IsDeferred":false},{"Name":"shade1_6","Code":"colorShade1(\u002736A2EB\u0027, 10);","IsDeferred":false},{"Name":"shade2_3","Code":"colorShade2(\u0027AEF\u0027, 10);","IsDeferred":false},{"Name":"shade2_6","Code":"colorShade2(\u002736A2EB\u0027, 10);","IsDeferred":false}]}