How can I cycle through hex color codes in PHP?

前端 未结 9 2216
野的像风
野的像风 2021-01-06 06:08

I want an array where each field in the array contains a color code

array(0 => \'#4CFF00\', 1 => \'#FFE97F\')

And I want this to go t

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 06:42

    Look at hexdec, dechex and this snippet:

    for ($i = 0; $i < 255; $i++) {
        # here happens some colour-magic
    }
    

    Cheers,

提交回复
热议问题