Releasing IQ::Color

At SonicIQ we have a number of RubyGems used internally that we haven’t found time to open-source yet i.e. cleanup the documentation and get into state that people can find useful. I’m going to make it my mission to get some of these out there which first involves releasing some of the smaller Gems that the larger ones depend on.

IQ::Color is a really simple Gem for converting colour values to and from CSS(3) notation, this is used by a couple of our larger Gems but I can see it being of use on it’s own. A simple example:


color1 = IQ::Color.RGB.new(127, 127, 255)
color1.to_css #=> "#7f7fff"

color2 = IQ::Color.from_css('rgba(127,127,255,0.4)')
color2.red    #=> 127
color2.green  #=> 127
color2.blue   #=> 255
color2.alpha  #=> 0.4
color2.to_css #=> "rgba(127,127,255,0.4)"

More examples can be found on GitHub.

Published by

Jamie

Hi, I am the Managing Director of SonicIQ Limited in the UK. I have been working in the web development industry since 1999 and have been running SonicIQ since 2001. Currently Ruby On Rails is my preferred development platform. I am experienced in designing with web standards, HTML5, CSS3 and Javascript.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>