1.imagecolorallocate
文法:int imagecolorallocate(int im,int red,int green,int blue)
該函數的功能是在im為表示的映像中設定RGB模式的顏色,傳回值為一個標識,這個標識唯一確定了一個在im映像的顏色,只有使用改函數指定到特定映像中的顏色才能被該映像使用,一個映像中所有實用的顏色都必須用這樣的方法來指定。而且一個映像不能使用另外一個映像中的顏色
2.imagecolortransparent
文法:int imagecolortransparent(int im[,int col])
該函數給映像指定透明的背景色,im為映像的標識,col為使用ImageColorAllocate函數給映像指定的顏色,傳回值為新指定的透明色的標識
3.imagecolorat
文法: int imagecolorat(int im,int x,int y)
該函數可以取得映像中的點源素的顏色值。參數im為圖形的標識,x和Y分別為映像中的點所在的位置的橫座標和縱座標
4.imagecolorclosest
文法:int imagecolorclosest(int im,int red,int green,int blue)
該函數可以計算給定的映像中某點的顏色和哪個顏色的索引值最接近,參數im為映像的標識。
5.imagecoloeset
文法:bool imagecolorset(int im,int index,int red,int green,int blue)
該函數可以設定映像的色彩索引表中指定索引的顏色 。index為指定的索引號
6.imagecolorsforindex
文法:array imagecolorsforindex(int im,int index)
該函數從映像的元素索引表中根據索引號取得指定的顏色
7.imagecolorstotal
文法:int imagecolorstotal(int im)
該函數能探測映像總共使用了多少種顏色