Class: Color::YIQ

Class | Color::YIQ
In: | lib/color.rb lib/color/yiq.rb
Parent: | Object

A colour object representing YIQ (NTSC) colour encoding.

### Methods

== brightness from_fraction new to_grayscale to_greyscale to_yiq

### Attributes

i | [RW] |
q | [RW] |
y | [RW] |

### Public Class methods

from_fraction(y = 0, i = 0, q = 0)

Creates a YIQ colour object from fractional values 0 .. 1.

      Color::YIQ.new(0.3, 0.2, 0.1)

new(y = 0, i = 0, q = 0)

Creates a YIQ colour object from percentages 0 .. 100.

      Color::YIQ.new(10, 20, 30)

### Public Instance methods

==(other)

Compares the other colour to this one. The other colour will be converted to YIQ before comparison, so the comparison between a YIQ colour and a non-YIQ colour will be approximate and based on the other colour‘s to_yiq conversion. If there is no to_yiq conversion, this will raise an exception. This will report that two YIQ values are equivalent if all component colours are within 1e-4 (0.0001) of each other.

brightness()
to_grayscale()
to_greyscale()

Alias for to_grayscale

to_yiq()

[Validate]