rgb(255, 0, 0) f0f0f0
# File lib/less/engine/nodes/literal.rb, line 44 def * other; operate :*, other end
# File lib/less/engine/nodes/literal.rb, line 42 def + other; operate :+, other end
# File lib/less/engine/nodes/literal.rb, line 43 def - other; operate :-, other end
# File lib/less/engine/nodes/literal.rb, line 45 def / other; operate :/, other end
# File lib/less/engine/nodes/literal.rb, line 25 def alpha v self.class.new r, g, b, v end
# File lib/less/engine/nodes/literal.rb, line 47 def coerce other return self, other end
# File lib/less/engine/nodes/literal.rb, line 59 def inspect if a < 1.0 "rgba(#{r}, #{g}, #{b}, #{a})" else "rgb(#{r}, #{g}, #{b})" end end
# File lib/less/engine/nodes/literal.rb, line 33 def operate op, other color = if other.is_a? Numeric rgb.map {|c| c.send(op, other) } else rgb.zip(other.rgb).map {|a, b| a.send(op, b) } end self.class.new *[color, @a].flatten # Ruby 1.8 hack end
# File lib/less/engine/nodes/literal.rb, line 67 def to_css to_s end
Generated with the Darkfish Rdoc Generator 2.