mister5317 Posted March 23, 2009 Share Posted March 23, 2009 I have an array of hexadecimal color codes: Array ( [0] => 2060A0 [1] => 204080 [2] => 206080 [3] => 000000 [4] => A0A0A0 [5] => C0C0C0 [6] => 808080 [7] => E0E0E0 [8] => 404040 [9] => 80A0A0 [10] => 202020 [11] => 002020 ) I would like to sort the array by color. I tried a natsort() and that didn't work the way I would have liked. Does anyone have any ideas on how to accomplish this? Thanks! Link to comment https://forums.phpfreaks.com/topic/150772-sorting-hex-colors/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 23, 2009 Share Posted March 23, 2009 Define: "sort the array by color" Unless you tell us what you are trying to accomplish or show an example of what the results should be, no one can help you. Link to comment https://forums.phpfreaks.com/topic/150772-sorting-hex-colors/#findComment-792159 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.