Class: Fauve::Scheme::Colour

Inherits:
Object
  • Object
show all
Defined in:
lib/fauve/scheme/colour.rb

Overview

Representation of a colour as part of a wider scheme. Holds a raw colour and a colour with filters applied. Requires Fauve::Scheme::ColourMap, Fauve::Scheme::Section and Fauve::Scheme::Reference

Constant Summary collapse

@@candidates =
[]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(section, reference) ⇒ Colour

Returns a new instance of Colour.



15
16
17
18
19
20
21
22
# File 'lib/fauve/scheme/colour.rb', line 15

def initialize(section, reference)
  @colour_map = ColourMap.instance
  @section    = section
  @reference  = reference
  @candidate  = operations.shift
  @filters    = operations
  @raw_colour = determine_raw_colour
end

Instance Attribute Details

#filtersObject (readonly)

Returns the value of attribute filters.



13
14
15
# File 'lib/fauve/scheme/colour.rb', line 13

def filters
  @filters
end

#raw_colourObject (readonly)

Returns the value of attribute raw_colour.



13
14
15
# File 'lib/fauve/scheme/colour.rb', line 13

def raw_colour
  @raw_colour
end

Instance Method Details

#colourObject



24
25
26
# File 'lib/fauve/scheme/colour.rb', line 24

def colour
  raw_colour
end