Sha256: 387c2d5bbcdf4ce775b0d826fc61ed5afc2de45d30a8325b93fd47179d8ed250
Contents?: true
Size: 347 Bytes
Versions: 3
Compression:
Stored size: 347 Bytes
Contents
require 'css_colors' module Rubygoo # is an rbga color class GooColor attr_accessor :r,:g,:b,:a def initialize(r,g,b,a) @r,@g,@b,@a = r,g,b,a end def self.css_color(sym, alpha=nil) color = CSS_COLORS[sym] a = alpha.nil? ? color[3] : alpha GooColor.new color[0], color[1], color[2], a end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubygoo-0.0.4 | lib/rubygoo/goo_color.rb |
rubygoo-0.0.6 | lib/rubygoo/goo_color.rb |
rubygoo-0.0.5 | lib/rubygoo/goo_color.rb |