Sha256: 2bd37ba9da7e37735eef7d140c6f7cb22ef2d31dccaadd855a0a0590d6e07569

Contents?: true

Size: 389 Bytes

Versions: 14

Compression:

Stored size: 389 Bytes

Contents

require "zlib"

module Paint
  RGB_COLORS_INDEX_FILENAME = File.dirname(__FILE__) + "/../../data/rgb_colors.marshal.gz"
  # A list of color names, based on X11's rgb.txt

  File.open(RGB_COLORS_INDEX_FILENAME, "rb") do |file|
    serialized_data = Zlib::GzipReader.new(file).read
    serialized_data.force_encoding Encoding::BINARY
    RGB_COLORS = Marshal.load(serialized_data)
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
ric-0.14.2 vendor/bundle/ruby/2.7.0/gems/paint-2.2.1/lib/paint/rgb_colors.rb
ric-0.14.1 vendor/bundle/ruby/2.7.0/gems/paint-2.2.1/lib/paint/rgb_colors.rb
ric-0.14.0 vendor/bundle/ruby/2.7.0/gems/paint-2.2.1/lib/paint/rgb_colors.rb
paint-2.2.1 lib/paint/rgb_colors.rb
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/paint-2.2.0/lib/paint/rgb_colors.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/paint-2.2.0/lib/paint/rgb_colors.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/paint-2.2.0/lib/paint/rgb_colors.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/paint-2.2.0/lib/paint/rgb_colors.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/paint-2.2.0/lib/paint/rgb_colors.rb
paint-2.2.0 lib/paint/rgb_colors.rb
paint-2.1.1 lib/paint/rgb_colors.rb
paint-2.1.0 lib/paint/rgb_colors.rb
paint-2.0.3 lib/paint/rgb_colors.rb
paint-2.0.2 lib/paint/rgb_colors.rb