99designs / colorific

Automatic color palette detection
ISC License
700 stars 55 forks source link

use on webserver #4

Closed 00hello closed 12 years ago

00hello commented 12 years ago

I'm new to python but Is it possible to use colorific in a webserver where instead of streaming the image file in through an echo command it's opened via a url?

dhotson commented 12 years ago

You can use colorific as a Python library in your own project.

For example:

>>> import colorific
>>> colorific.extract_colors('logo.png')
Palette(colors=[Color(value=(0, 71, 241), prominence=0.05489819439108721), Color(value=(230, 27, 49), prominence=0.03891663465232424), Color(value=(62, 123, 244), prominence=0.02009220130618517), Color(value=(0, 176, 24), prominence=0.017518248175182483), Color(value=(249, 166, 0), prominence=0.017479830964271994)], bgcolor=None)
00hello commented 12 years ago

It worked. Thanks

dhotson commented 12 years ago

No worries. Have fun. :-)