projekod/roundcolor

It finds the nearest base color of given color from the given base color list

dev-master 2014-06-23 21:34 UTC

This package is auto-updated.

Last update: 2024-10-06 23:56:45 UTC


README

It finds the nearest base color of given color from the given base color list.

Test image :

RoundColor Test img

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