Module: Abachrome::Gamut

Defined in:
lib/abachrome.rb,
lib/abachrome/gamut/p3.rb,
lib/abachrome/gamut/base.rb,
lib/abachrome/gamut/srgb.rb,
lib/abachrome/gamut/rec2020.rb

Defined Under Namespace

Classes: Base, P3, Rec2020, SRGB

Class Method Summary collapse

Class Method Details

.find(name) ⇒ Object



10
11
12
13
# File 'lib/abachrome/gamut/base.rb', line 10

def self.find(name)
  @gamuts ||= {}
  @gamuts[name.to_sym] or raise ArgumentError, "Unknown gamut: #{name}"
end

.gamutsObject



15
16
17
# File 'lib/abachrome/gamut/base.rb', line 15

def self.gamuts
  @gamuts ||= {}
end

.register(gamut) ⇒ Object



5
6
7
8
# File 'lib/abachrome/gamut/base.rb', line 5

def self.register(gamut)
  @gamuts ||= {}
  @gamuts[gamut.name] = gamut
end