Module: Mosaiq::Palette
- Defined in:
- lib/mosaiq/palette.rb
Overview
Palette defines various arrays of colors
Class Method Summary collapse
Class Method Details
.black_and_white ⇒ Object
8 9 10 |
# File 'lib/mosaiq/palette.rb', line 8 def black_and_white %w[#ffffff #000000] end |
.grays ⇒ Object
12 13 14 |
# File 'lib/mosaiq/palette.rb', line 12 def grays 0.upto(255).map { |n| "rgb(#{n}, #{n}, #{n})" } end |
.random_colors(number) ⇒ Object
16 17 18 19 20 |
# File 'lib/mosaiq/palette.rb', line 16 def random_colors(number) number.times.map do "rgb(#{rand(256)}, #{rand(256)}, #{rand(256)})" end end |