PHP - Rotate a HEX color value (eg swap all colors with "next" hex)

Posted by Joe on Stack Overflow See other posts from Stack Overflow or by Joe
Published on 2010-03-28T12:01:37Z Indexed on 2010/03/28 12:03 UTC
Read the original article Hit count: 489

Filed under:
|
|

I have a set of hex values in an array in PHP. On my page, I have a slider which the user can "slide" to return a value between 1-100. I want to then, based on this slider value, swap all the colors in the array based on the colors "next" color based on the position in the array. An example of the same sort of thing would be like in photshop where you can rotate the hue of a layer. I want to do the same thing, in PHP, for a hex value.

Any clues?

© Stack Overflow or respective owner

Related posts about php

Related posts about hex