PHP imagecolorexact - 取得指定顏色的索引值
imagecolorexact — 取得指定顏色的索引值。
語法
int imagecolorexact ( resource $image , int $red , int $green , int $blue )
返回圖像調色板中指定顏色的索引值。
如果顏色不在圖像的調色板中,返回 -1。
如果從檔創建了圖像,只有圖像中使用了的顏色會被辨析。僅出現在調色板中的顏色不會被辨析。
相關文章
- imagecolorclosest() 取得與指定的顏色最接近的顏色的索引值。