Module: CarrierWave::Color

Defined in:
lib/carrierwave/color.rb,
lib/carrierwave/color/version.rb,
lib/carrierwave/color/detection.rb

Defined Under Namespace

Modules: Detection

Constant Summary collapse

VERSION =
"1.0.2"

Instance Method Summary collapse

Instance Method Details

#store_dominant_colorObject



5
6
7
8
# File 'lib/carrierwave/color.rb', line 5

def store_dominant_color
  color = Detection.dominant_html(current_path)
  model.send "#{mounted_as}_dominant_color=", color
end

#store_palette_color(palette = Colorscore::Palette::DEFAULT) ⇒ Object



10
11
12
13
# File 'lib/carrierwave/color.rb', line 10

def store_palette_color(palette = Colorscore::Palette::DEFAULT)
  color = Detection.dominant_from_palette_html(current_path, palette)
  model.send "#{mounted_as}_palette_color=", color
end