Class: Chroma::Converters::Base
Abstract
- Inherits:
-
Object
- Object
- Chroma::Converters::Base
show all
- Includes:
- Helpers::Bounders
- Defined in:
- lib/chroma/converters/base.rb
Overview
Base class for converting one color mode to another.
Class Method Summary
collapse
Instance Method Summary
collapse
#bound01, #bound_alpha, #clamp01, #to_percentage
Constructor Details
#initialize(input) ⇒ Base
10
11
12
|
# File 'lib/chroma/converters/base.rb', line 10
def initialize(input)
@input = input
end
|
Class Method Details
22
23
24
|
# File 'lib/chroma/converters/base.rb', line 22
def self.convert_hsl(hsl)
new(hsl).convert_hsl
end
|
28
29
30
|
# File 'lib/chroma/converters/base.rb', line 28
def self.convert_hsv(hsv)
new(hsv).convert_hsv
end
|
16
17
18
|
# File 'lib/chroma/converters/base.rb', line 16
def self.convert_rgb(rgb)
new(rgb).convert_rgb
end
|