{"id":89,"date":"2008-02-27T03:05:48","date_gmt":"2008-02-27T07:05:48","guid":{"rendered":"http:\/\/patorjk.com\/blog\/2008\/02\/27\/yahoo-ui-and-image-color-pallet-generator-updates\/"},"modified":"2014-01-25T18:02:49","modified_gmt":"2014-01-25T22:02:49","slug":"yahoo-ui-and-image-color-pallet-generator-updates","status":"publish","type":"post","link":"https:\/\/patorjk.com\/blog\/2008\/02\/27\/yahoo-ui-and-image-color-pallet-generator-updates\/","title":{"rendered":"Yahoo UI and Image Color Palette Generator Updates"},"content":{"rendered":"<p>After talking to a friend who had been going on and on about it, I decided to take a look at the <a href=\"http:\/\/developer.yahoo.com\/yui\/\">Yahoo User Interface Library<\/a>, or YUI. From Yahoo&#8217;s own website YUI &#8220;is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX.&#8221;<\/p>\n<p>They&#8217;re actually really cool, and surprisingly easily to use. After doing some searching I found a few other free Javascript toolkits: <a href=\"http:\/\/jquery.com\/\">jQuery<\/a>, <a href=\"http:\/\/www.prototypejs.org\/\">Prototype<\/a>, <a href=\"http:\/\/mootools.net\/\">Mootools<\/a>, and <a href=\"http:\/\/code.google.com\/webtoolkit\/\">Google Web Toolkit<\/a>. This of course isn&#8217;t an exhaustive list of all that&#8217;s out there, but these seem to be the most popular. I had actually heard of jQuery, but because of it&#8217;s name I had always thought it had something to do with SQL or Java.<\/p>\n<p>After a not too extensive check of the available features, I decided to try YUI first. Mostly because I thought their tools looked the nicest and they have an Image Uploader (something I haven&#8217;t tried yet, but plan to). I decided to soop-up my <a href=\"http:\/\/patorjk.com\/software\/colorpalettegenerator\/\">Image Color Palette Generator<\/a>, which has so far been pretty plain. I&#8217;m still in the process of adding stuff to it (which I&#8217;ll describe below), so it&#8217;s currently a mess, but it&#8217;s now set up so that once you generate a color palette you can play around with a nifty little slider bar that will allow you to navigate through the HSL color space.<\/p>\n<p>I&#8217;m sure a lot people will look at it and think &#8220;Ok, so you added a slider bar&#8230;&#8221;, but it&#8217;s pretty freakin&#8217; cool. Once the app is fully complete it&#8217;ll come together a lot better. These new tools are great though. I can&#8217;t wait to check out some of the others.<\/p>\n<p>On a related note, these toolkits remind me of an interesting article I read a couple months back on the possible emergence of a <a href=\"http:\/\/www.joelonsoftware.com\/items\/2007\/09\/18.html\">new SDK<\/a> that could spell the end for Google&#8217;s Gmail. It&#8217;s a neat read if you have some time.<\/p>\n<p>Image Color Palette Generator Updates<\/p>\n<p>First, let me say I did some house cleaning on this app and sped it up by 700% on my machine. So if you were having trouble with it before, you should be able to use it fine now (if not, please let me know). I even have some more ideas for speed ups, but they&#8217;ll be in the next release. I was a bit sloppy in my initial implementation, I guess I thought I could get away with doing some simple math and string concatenation inside of the loop that looked at the image&#8217;s pixels, but those fractions of a second add up fast. I used table lookups to replace the unnecessary calculations. As soon as I&#8217;m done with everything on it, I&#8217;ll release the source so people can better understand what&#8217;s going on.<\/p>\n<p>Aside from that, the program is now set up to generate 4 color palettes for you. The two it generates that get displayed on the left side of the screen represent the color palette for the image and the complimentary color palette for the image. The two it generates that get displayed on the right represent the &#8220;<a href=\"http:\/\/www.colourlovers.com\/blog\/2007\/09\/02\/the-muller-formula-or-predictable-color-preferences\/\">Muller Formula<\/a>&#8221; versions of these color palettes. The Muller Formula is something that professor Aemelius M\u00fcller from Switzerland came up with that basically predicts what colors users will find pleasing. No actual formula is given on that website, so I had to infer one based on the basic idea. Right now I&#8217;m still tweaking it, so it&#8217;s still kind of experimental for the moment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After talking to a friend who had been going on and on about it, I decided to take a look at the Yahoo User Interface Library, or YUI. From Yahoo&#8217;s own website YUI &#8220;is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, &hellip; <a href=\"https:\/\/patorjk.com\/blog\/2008\/02\/27\/yahoo-ui-and-image-color-pallet-generator-updates\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Yahoo UI and Image Color Palette Generator Updates<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-software"],"_links":{"self":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":1,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":2760,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/89\/revisions\/2760"}],"wp:attachment":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}