def setup
# Grayscale integer value
background(220)
fill(51)
rect(20, 20, 60, 60)
end
def setup
# R, G & B integer values
background(220)
fill(255, 204, 0)
rect(20, 20, 60, 60)
end
def setup
# H, S & B integer values
background(220)
colorMode(HSB)
fill(255, 204, 100)
rect(20, 20, 60, 60)
end
def setup
# Named SVG/CSS color string
background(220)
fill('red')
rect(20, 20, 60, 60)
end
def setup
# three-digit hexadecimal RGB notation
background(220)
fill('#fae')
rect(20, 20, 60, 60)
end
def setup
# six-digit hexadecimal RGB notation
background(220)
fill('#222222')
rect(20, 20, 60, 60)
end
def setup
# integer RGB notation
background(220)
fill('rgb(0, 255, 0)')
rect(20, 20, 60, 60)
end
def setup
# integer RGBA notation
background(220)
fill('rgba(0, 255, 0, 0.25)')
rect(20, 20, 60, 60)
end
def setup
# percentage RGB notation
background(220)
fill('rgb(100%, 0%, 10%)')
rect(20, 20, 60, 60)
end
def setup
# percentage RGBA notation
background(220)
fill('rgba(100%, 0%, 100%, 0.5)')
rect(20, 20, 60, 60)
end
def setup
# p5 Color object
background(220)
fill(color(0, 0, 255))
rect(20, 20, 60, 60)
end