Sha256: a83da4ef6fa9d792591eff4e1f95b840eca3102cda4be7a5b8ba31843d46208f

Contents?: true

Size: 493 Bytes

Versions: 3

Compression:

Stored size: 493 Bytes

Contents

require 'ruby-processing'

# RGB color is specified by intensity of red, then green, then blue.
class RgbColor < Processing::App

  def setup
    smooth
    
    background 255
    no_stroke
    
    # Bright red
    fill 255, 0, 0
    ellipse 20, 20, 16, 16
    
    # Dark red
    fill 127, 0, 0
    ellipse 40, 20, 16, 16
    
    # Pink
    fill 255, 200, 200
    ellipse 60, 20, 16, 16
  end
  
  def draw
  
  end
  
end

RgbColor.new :title => "Rgb Color", :width => 200, :height => 200

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-processing-1.0.1 samples/learning_processing/chapter_01/3_rgb_color.rb
ruby-processing-1.0.2 samples/learning_processing/chapter_01/3_rgb_color.rb
ruby-processing-1.0.3 samples/learning_processing/chapter_01/3_rgb_color.rb