Open jeremydouglass opened 4 years ago
JrubyArt version now at Rosetta Code
# Array of web colors black, red, green, blue, magenta, cyan, yellow, white
PALETTE = %w[#000000 #ff0000 #00ff00 #0000ff #ff00ff #00ffff #ffffff].freeze
def settings
full_screen
end
def setup
PALETTE.each_with_index do |col, idx|
fill color(col)
rect(idx * width / 8, 0, width / 8, height)
end
end
This is a working example of a "total set" submission -- with a version for Java mode, Python mode, Processing.R, and p5.js JavaScript. It could use a JRubyArt example.