Class: Imagga::ImageColor
Class Method Summary
collapse
Instance Method Summary
collapse
#initialize
Class Method Details
.fields ⇒ Object
48
49
50
|
# File 'lib/imagga/image.rb', line 48
def self.fields
%w(percent r g b html_code closest_palette_color closest_palette_color_parent closest_palette_distance)
end
|
Instance Method Details
#info ⇒ Object
64
65
66
|
# File 'lib/imagga/image.rb', line 64
def info
"%.2f\%%, rgb: (%i,%i,%i), hex: %s" % [percent, r, g, b, html_code]
end
|
#percent=(value) ⇒ Object
60
61
62
|
# File 'lib/imagga/image.rb', line 60
def percent=(value)
@percent = value.to_f
end
|