tag:blogger.com,1999:blog-9008563869490582540.post7858522038121825806..comments2023-12-16T00:19:47.311-08:00Comments on Runtime Era: Grouping HTML Hex Colors by Hue in JavaScriptUnknownnoreply@blogger.comBlogger6125tag:blogger.com,1999:blog-9008563869490582540.post-16167157391985509142015-04-11T02:35:30.752-07:002015-04-11T02:35:30.752-07:00hi, can you send the example to me? my email is ad...hi, can you send the example to me? my email is adats_a10@yahoo.comRafale https://www.blogger.com/profile/08681792399352910987noreply@blogger.comtag:blogger.com,1999:blog-9008563869490582540.post-75525133200423487122014-07-17T09:39:21.837-07:002014-07-17T09:39:21.837-07:00No Lucia, the hex stays. It is a key in your arra...No Lucia, the hex stays. It is a key in your array of color objects. Each object should be setup as {"hex":"#HEXCODE"}. It took me awhile to figure out as well. The function uses an array of objects, not just an array of colors. A data example would have been helpful in the tutorial. I have included one here. <br /><br />var unsortedArrayOfColorObjects=[{"hex":"#c6deea"},{"hex":"#c37751"},{"hex":"#83575a"},{"hex":"#dcc896"},{"hex":"#c37751"}, {"hex":"#8e5a64"},{"hex": "#5f233c"}, {"hex":"#3d8e33"}, {"hex":"#a01437"},{"hex":"#ff5f00"}, {"hex":"#000000"}, {"hex":"#698c41"}, {"hex":"#002b7f"}, {"hex":"#b6b8b8"}, {"hex":"#82c8b4"}, {"hex":"#596d9e"},{"hex": "#4d0021"}];Lukehttps://www.blogger.com/profile/16360152331406256214noreply@blogger.comtag:blogger.com,1999:blog-9008563869490582540.post-14279379835260511892014-06-25T10:53:21.997-07:002014-06-25T10:53:21.997-07:00Could you send me the code example @ cbshl@hotmail...Could you send me the code example @ cbshl@hotmail.ca<br /><br />Thanks !Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9008563869490582540.post-76443392507124793272013-05-21T07:15:42.796-07:002013-05-21T07:15:42.796-07:00Hello there,
thank you for the code.
I believe in...Hello there, <br />thank you for the code.<br />I believe in line 4 you mean<br /><br />var hex = colors[c].substring(1);<br /><br />instead of<br /><br />var hex = colors[c].hex.substring(1);<br /><br />Don't you?Lucianoreply@blogger.comtag:blogger.com,1999:blog-9008563869490582540.post-7976904206156122792013-01-05T00:57:21.962-08:002013-01-05T00:57:21.962-08:00I believe you are correct. I've made the chang...I believe you are correct. I've made the change. Thanks so much!Fredhttps://www.blogger.com/profile/12953897621882468934noreply@blogger.comtag:blogger.com,1999:blog-9008563869490582540.post-59014754410156198082013-01-05T00:16:55.276-08:002013-01-05T00:16:55.276-08:00Wonderful post explaining RGB -> HSV conversion...Wonderful post explaining RGB -> HSV conversion. <br /><br />I believe there is a small error in the code:<br /><br />else if (b == max) { <br /> hue = 250+60*(((r-min)-(g-min))/chr); <br />}<br /><br />Should use 240 (not 250) in the hue calculation, correct?thauburgernoreply@blogger.com