Module

Color

Colour Management with Ruby

Copyright

Copyright 2005 by Austin Ziegler

Color::RGB and Color::CMYK were originally developed for the Ruby PDF project and PDF::Writer and represent wholly unique code.

Color::Palette was developed based on techniques described by Andy "Malarkey" Clarke, implemented in JavaScript by Steve G. Chipman at SlayerOffice and by Patrick Fitzgerald of BarelyFitz in PHP.

LICENCE

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  • The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Modules
CSS This namespace contains some CSS colour names.
Palette
Classes
CMYK An CMYK colour object. CMYK (cyan, magenta, yellow, and black) colours are based on additive percentages of ink. A CMYK colour of (0.3, 0, 0.8, 0.3) would be mixed from 30% cyan, 0% magenta, 80% yellow, and 30% black.
GrayScale A colour object representing shades of grey. Used primarily in PDF document creation.
HSL An HSL colour object. Internally, the hue (#h), saturation (#s), and luminosity (#l) values are dealt with as fractional values in the range 0..1.
RGB An RGB colour object.
YIQ A colour object representing YIQ (NTSC) colour encoding.
Constants
COLOR_TOOLS_VERSION
GreyScale A synonym for Color::GrayScale.
Public Methods
const_missing
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.