projekod / roundcolor
它从给定的基础颜色列表中找到与给定颜色最接近的基础颜色。
dev-master
2014-06-23 21:34 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-06 23:47:17 UTC
README
它从给定的基础颜色列表中找到与给定颜色最接近的基础颜色。
测试图像 :
基础颜色 :
"964b00" //Brown "000000" //Black "403d3f" //smoked (Turkish : Füme ) "808080" //Gray "f5f5dc" //Beige (Turkish : Bej ) "ffffff" //White "ffcbdb" //Pink "ff00ff" //Fuchsia (Turkish : Fuşya ) "9370db" //Purple "b03060" //Claret Red (Turkish : Bize her yer trabzon! ) "0000ff" //Blue "40e0d0" //Turquoise "00ff00" //Green "ffff00" //Yellow "ff7f00" //Orange "ff0000" //Red
用法 :
$color = "#f3f3dd"; $PKR = new PKRoundColor(); $roundedColor = $PKR->getRoundedColor($color); echo $roundedColor;
返回值 :
#f5f5dc