projekod / roundcolor
It finds the nearest base color of given color from the given base color list
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 22
Watchers: 4
Forks: 3
Open Issues: 0
pkg:composer/projekod/roundcolor
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2025-10-07 01:58:22 UTC
README
It finds the nearest base color of given color from the given base color list.
Test image :
Base Colors :
"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
usage :
$color = "#f3f3dd"; $PKR = new PKRoundColor(); $roundedColor = $PKR->getRoundedColor($color); echo $roundedColor;
Return Value :
#f5f5dc