feat: implement main logic and implement webp support

This commit is contained in:
2021-10-04 09:14:38 +03:00
parent f2cfc0feea
commit 9451d2c679
5 changed files with 82 additions and 9 deletions
+6 -2
View File
@@ -1,10 +1,14 @@
# ColorX (WIP)
# ColorX
ColorX is a library to determine the most prominent color in an image.
ColorX doesn't use any sort of complex algorithms to calculate the prominent color, it simply loops over the image pixels and returns the color that occurs the most.
The `getProminentColor` function returns the color in 2 formats, a hex string such as: `#abfecd` and a variable of type `color.Color`.
# Example
Example code is written in [example/example.go](https://github.com/illusionman1212/colorx/blob/master/example/example.go)
An example on how to use this library is written in [example/example.go](https://github.com/illusionman1212/colorx/blob/master/example/example.go)
# Supported Image Formats
Currently ColorX supports these image formats:
- png
- jpeg
- webp