Pictaculous

Pictaculous is a Ruby gem that provides a wrapper for interacting with the Pictaculous API. Simply provide an image, and Pictaculous will return color palettes to match your image.

Installation

(sudo) gem install pictaculous

Usage

Please refer to the Pictaculous API Documentation for information about what data the API will return.

require 'pictaculous'

image_data = File.read('/path/to/image.jpg')
palettes = Pictaculous.find(image_data)

palettes.info.colors
=> ["C9C9C9", "010101", "000000", "877866", "FFFFFF"]

palettes.kuler_themes.size
=> 5

If there is an error, it will be returned in the response:

palettes.error if palettes.respond_to?(:error)
=> "Invalid file type"

Contributing to Pictaculous

Copyright © 2012 Tatemae Consultancy. See LICENSE.txt for further details.