Method: Chroma::Color#complement
- Defined in:
- lib/chroma/color.rb
#complement ⇒ Color
Returns the complementary color.
69 70 71 72 73 |
# File 'lib/chroma/color.rb', line 69 def complement hsl = self.hsl hsl.h = (hsl.h + 180) % 360 self.class.new(hsl, @format) end |