blenderskool / pigmnts

🎨 Color palette generator from an image using WebAssesmbly and Rust
https://pigmnts.web.app
MIT License
73 stars 4 forks source link

Added Color Names #23

Closed srujandeshpande closed 4 years ago

srujandeshpande commented 4 years ago

Added the option to view color names. This can be used with the -n flag. Implements #21

blenderskool commented 4 years ago

Hi @srujandeshpande, thanks for taking the time to implement this feature. While the API does work, Pigmnts library already has the necessary functions for finding the nearest color from a group of colors. What's missing is a dataset of color names for which https://github.com/meodai/color-names is a good place to start as they provide the datasets as well.

Few reasons on why we can try avoiding the API:

Again since Pigmnts library has functions that can help in this, it doesn't seem very difficult to implement a native solution. If you are interested in this issue, you can take a look at functions in this file /lib/src/color.rs

srujandeshpande commented 4 years ago

Good points @blenderskool. Thanks, I'll look at the library