Add comparator list in readme

This commit is contained in:
nxshock 2017-07-01 10:28:51 +05:00
parent 4d01a57714
commit 4bb8f41757

View file

@ -37,6 +37,11 @@ croppedImage := colorcrop.CropWithComparator(
colorcrop.CmpCIE76) // using CIE76 standart for defining color difference colorcrop.CmpCIE76) // using CIE76 standart for defining color difference
``` ```
Available comparators are:
- `CmpRGBComponents` - simple RGB components difference: `abs(r1-r2)+abs(g1-g2)+abs(b1-b2)` (default);
- `CmpEuclidean` - [Euclidean difference](https://en.wikipedia.org/wiki/Color_difference#Euclidean);
- `CmpCIE76` - difference of two colors defined in [CIE76 standart](https://en.wikipedia.org/wiki/Color_difference#CIE76).
## Examples ## Examples
See [here](https://github.com/nxshock/colorcrop/blob/master/example_test.go). See [here](https://github.com/nxshock/colorcrop/blob/master/example_test.go).