stroke

概要

p5.jsリファレンス(参考情報)

[p5.js] stroke

サンプル

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

構文

戻値