class Colors::XYY
Attributes
Public Class Methods
Source
# File lib/colors/xyy.rb, line 5 def initialize(x, y, large_y) @x, @y, @large_y = canonicalize(x, y, large_y) end
Public Instance Methods
Source
# File lib/colors/xyy.rb, line 15 def ==(other) case other when XYY x == other.x && y == other.y && large_y == other.large_y else super end end
Calls superclass method
Source
# File lib/colors/xyy.rb, line 32 def luv_components(wp) to_xyz.luv_components(wp) end
Source
# File lib/colors/xyy.rb, line 28 def rgb_components to_xyz.rgb_components end
Source
# File lib/colors/xyy.rb, line 36 def to_xyz XYZ.new(*Convert.xyy_to_xyz(*components)) end
Private Instance Methods
Source
# File lib/colors/xyy.rb, line 40 def canonicalize(x, y, large_y) [ Rational(x), Rational(y), Rational(large_y) ] end