xcolor – jQuery color plugin

The xcolor plugin is an easy-to-use jQuery extension to manipulate colors in all imaginable combinations. This plugin implements an extensiv color parser and a featureful set of color-manipulation methods. There is also an animate() extension to smooth CSS colors. Another useful method isReadable() completes the whole, by allowing you to check if a text is readable on a certain background. The color value can also be passed in different color models: RGB, HSV/HSB, HSL and their adequate alpha extensions.

xcolor xcolor   jQuery color plugin

All simple color methods return per default the color as hex value. To be correct, the hex value is generated by the overridden toString() method. Thus, in general an object is returned, which can be accessed by one of the following methods:

  • getRGB() – Returns the color as RGB object
  • getHSV() – Returns the color as HSV object
  • getInt() – Returns the color as normalized integer value
  • getFraction() – Returns the color as fractions object, with every value in the interval [0, 1]
  • getCss() – Returns the color formatted as a string to be passed to a CSS color attribute
  • getName() – Returns the nearest color name
  • getHex() – Returns the color as Hex string (default)

Requirements: jQuery framework
Demo: http://www.xarg.org/project/jquery-color-plugin-xcolor/
Download: http://www.xarg.org/2010/07/my-jquery-playground/
License: License free

Incoming search terms for the article:

Related Posts

jquery-wordpress

Polyclip.js: Clip JPEG Images Into Polygons

1

jQuery Animated Cartoon Robot

1

turn.js: A jQuery Page Flip Effect For HTML5

1

jQuery Multi-Node Range and Data Slider