public
Fork of mbleigh/colorist
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/be9/colorist.git
name age message
file .gitignore Loading commit data...
file CHANGELOG.rdoc Fri Jun 19 01:56:08 -0700 2009 Version bump to 0.0.3 [oleg dashevskii]
file MIT_LICENSE.rdoc Sat Aug 16 13:17:53 -0700 2008 Initial commit. [mbleigh]
file README.rdoc
file Rakefile
file VERSION
file colorist.gemspec
directory lib/
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.