title: Sorting Hex color codes with increasing gradient
body: <p>I have a problem, i got few thousands of color codes RGB and Respective Hex values, I want to sort them to increasing order based on color intensity. I have found few methods to do so, but unable to understand how to implement them, can any one help me to guide how to make it work.</p>
  
  <p>solution 1:-
  <a href="http://www.runtime-era.com/2011/11/grouping-html-hex-colors-by-hue-in.html" rel="nofollow">javascript method</a></p>
  
  <p>solution 2:-</p>
  
  <p><a href="http://www.phpclasses.org/browse/package/4598.html" rel="nofollow">php method</a></p>
  
  <p>please note i have no expireance in php or javascript. but i have working wamp server, knows html.</p>
  
  <p>many thanks in advance</p>