Introducing ColourJS

Col­ourJS is a JavaS­cript lib­rary that can take a col­our and manip­u­late it — invert it or just change the format.

Just A Few Examples

ColourJS('#FF0000').invert().toHex(); // #00FFFF
ColourJS('#FF0000').invert().toRGB(); // rgb(0, 255, 255)

ColourJS('rgb(255, 0, 0)').invert().toRGB(); // rgb(0, 255, 255)
ColourJS('rgb(100%, 0%, 20%)').invert().toRGB(); // rgb(0, 255, 204)

The syn­tax is still a little awk­ward and func­tions are min­imal but for a first release, it works.

Licensed under GNU GPL v3.

Down­load Col­ourJS 1.0 here.

Comments

No responses have been made so far. Add your comments.

    What do you think? Leave a comment...