public
Description: A Ruby library built to handle the easy conversion and manipulation of colors with a special emphasis on W3C standards and CSS-style hex color notation.
Homepage:
Clone URL: git://github.com/mbleigh/colorist.git
name age message
file CHANGELOG.rdoc Wed Sep 17 14:09:26 -0700 2008 Bump version, add CHANGELOG. [mbleigh]
file MIT_LICENSE.rdoc Sat Aug 16 13:17:53 -0700 2008 Initial commit. [mbleigh]
file README.rdoc Mon Aug 18 07:25:00 -0700 2008 Doc and gemspec changes. [mbleigh]
file colorist.gemspec Wed May 20 07:05:00 -0700 2009 Bumping gem version. [mbleigh]
directory lib/ Tue Nov 18 03:20:09 -0800 2008 Added gradient_to method, that generates a grad... [tomafro]
README.rdoc

Colorist

Colorist is a library built to handle the conversion, comparison, and manipulation of colors in Ruby projects with an emphasis on W3C standards and CSS-style hex notation. See the Color class for additional details on the available methods.

Example

  require 'colorist'
  include Colorist

  gray = Color.new(0x333333)
  gray + gray     # => #<Color #666666>
  gray - "#333"   # => #<Color #000000>

  gray.invert     # => #<Color #cccccc>
  gray.brightness # => 0.2

  gray.contrast_with("#f00")

Resources

Copyright © 2008 Michael Bleigh and Intridea, Inc. Released under the MIT open source license.