Sha256: b114b9bc351a162e817c9d3657f23ef87d462464f979cc0e9d917921eee6d9da

Contents?: true

Size: 342 Bytes

Versions: 91

Compression:

Stored size: 342 Bytes

Contents

# frozen_string_literal: true

# atome sanitizer
class Atome
  private

  def create_color_hash(params)
    rgb_color = Color::CSS[params].css_rgb
    split_data = rgb_color.sub('rgb(', '').sub(')', '').gsub(',', '').split('%')
    { red: split_data[0].to_f / 100, green: split_data[1].to_f / 100, blue: split_data[2].to_f / 100 }
  end

end

Version data entries

91 entries across 91 versions & 1 rubygems

Version Path
atome-0.5.7.6.5 lib/atome/utilities/sanitizer.rb
atome-0.5.7.6.0 lib/atome/utilities/sanitizer.rb
atome-0.5.7.5.9 lib/atome/utilities/sanitizer.rb
atome-0.5.7.5.4 lib/atome/utilities/sanitizer.rb
atome-0.5.7.5.3 lib/atome/utilities/sanitizer.rb
atome-0.5.7.5.1 lib/atome/utilities/sanitizer.rb
atome-0.5.7.4.8 lib/atome/utilities/sanitizer.rb
atome-0.5.7.4.7 lib/atome/utilities/sanitizer.rb
atome-0.5.7.4.6 lib/atome/utilities/sanitizer.rb
atome-0.5.7.4.3 lib/atome/utilities/sanitizer.rb
atome-0.5.7.4.2 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.9 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.6 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.5 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.3 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.2 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.1 lib/atome/utilities/sanitizer.rb
atome-0.5.7.3.0 lib/atome/utilities/sanitizer.rb
atome-0.5.7.1.8 lib/atome/utilities/sanitizer.rb
atome-0.5.7.1.7 lib/atome/utilities/sanitizer.rb