{"id":285,"date":"2009-08-01T18:07:25","date_gmt":"2009-08-01T17:07:25","guid":{"rendered":"http:\/\/www.simonbattersby.com\/blog\/?page_id=285"},"modified":"2010-03-30T19:08:36","modified_gmt":"2010-03-30T18:08:36","slug":"hex-to-rgb-rgb-to-hex-and-colour-shade-selector","status":"publish","type":"page","link":"https:\/\/www.simonbattersby.com\/blog\/hex-to-rgb-rgb-to-hex-and-colour-shade-selector\/","title":{"rendered":"Hex to RGB, RGB to Hex and Colour Shade Selector"},"content":{"rendered":"<div id=\"top\">\r\n<form id=\"colour\" action=\"#\">\r\n<fieldset> \r\n<label for=\"hex\">Hex: <strong>#<\/strong><\/label><input id=\"hex\" name=\"hex\" type=\"text\" onchange=\"validateHex(this.value,this.id);\" \/> \r\n<label for=\"rgb_red\">RGB:<\/label> <input id=\"rgb_red\" name=\"rgb_red\" type=\"text\" onchange=\"validateRGB(this.value,this.id);\"\/> \r\n<input id=\"rgb_green\" name=\"rgb_green\" type=\"text\" onchange=\"validateRGB(this.value,this.id);\"\/> \r\n<input id=\"rgb_blue\" name=\"rgb_blue\" type=\"text\" onchange=\"validateRGB(this.value,this.id);\"\/> \r\n<input id=\"hex_btn\" onclick=\"hexToRGB();\" name=\"submit\" type=\"button\" value=\"Hex to RGB\" \/>\r\n<label id=\"invalid_hex\">Invalid entry<\/label><input id=\"rgb_btn\" onclick=\"rgbToHex();\" name=\"submit\" type=\"button\" value=\"RGB to Hex\" \/>\r\n<label id=\"invalid_rgb\">Invalid entry<\/label><\/fieldset><\/form><p class=\"legend\">Base Colour<\/p>\r\n<\/div>\r\n<div id=\"bottom\">\r\n<form id=\"shade\" action=\"#\"> \r\n<fieldset> \r\n<label for=\"lord_l\">Lighten:<\/label><input id=\"lord_l\" checked=\"checked\" name=\"lord\" type=\"radio\" \/> \r\n<label for=\"lord_d\">Darken:<\/label> <input id=\"lord_d\" name=\"lord\" type=\"radio\" \/> \r\n<label for=\"lord_val\" id=\"lordlabel\">Percentage: <\/label> <input id=\"lord_val\" name=\"lord_val\" type=\"text\" value=\"10\" \/> \r\n<input id=\"shade_btn\" onclick=\"changeShade()\" name=\"submit\" type=\"button\" value=\"Change shade\" \/> <label id=\"hexlabel\" for=\"hexnew\">Hex: <strong>#<\/strong><\/label> <input id=\"hexnew\" name=\"hexnew\" readonly=\"readonly\" type=\"text\" \/> \r\n<label id=\"rgbnewlabel\" for=\"rgb_rednew\">RGB: <\/label> <input id=\"rgb_rednew\" name=\"rgb_rednew\" readonly=\"readonly\" type=\"text\" \/> <input id=\"rgb_greennew\" name=\"rgb_greennew\" readonly=\"readonly\" type=\"text\" \/> <input id=\"rgb_bluenew\" name=\"rgb_bluenew\" readonly=\"readonly\" type=\"text\" \/> <input id=\"copy_btn\" onclick=\"copyColour()\" name=\"submit\" type=\"button\" value=\"Copy to base colour\" \/>\r\n<\/fieldset>\r\n<\/form>\r\n<p class=\"legend\">Changed Colour<\/p>\r\n<\/div>\r\n<ul>\r\n<li>Enter hex or RGB values to convert.<\/li>\r\n<li>Select &#8220;Lighten&#8221; or &#8220;Darken&#8221; and a percentage to lighten or darken the base colour.<\/li>\r\n<li> Click &#8220;Copy to base colour&#8221; to copy changed colour to base colour.<\/li>\r\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Hex: # RGB: Invalid entry Invalid entryBase Colour Lighten: Darken: Percentage: Hex: # RGB: Changed Colour Enter hex or RGB values to convert. Select &#8220;Lighten&#8221; or &#8220;Darken&#8221; and a percentage to lighten or darken the base colour. Click &#8220;Copy to base colour&#8221; to copy changed colour to base colour.<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-285","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/pages\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":0,"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/pages\/285\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.simonbattersby.com\/blog\/wp-json\/wp\/v2\/media?parent=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}