tint

概要

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

[p5.js] tint

サンプル

※以下のサンプルの実行の際には、rbCanvas/p5エディタ上で
 適当な画像ファイルの取り込みをおこなってください。

def setup
  img = loadImage("fruit.png")
  image(img, 0, 0)
  tint(0, 153, 204)   # Tint blue
  image(img, 50, 0)
end
def setup
  img = loadImage("fruit.png")
  image(img, 0, 0)
  tint(0, 153, 204, 126)   # Tint blue and set transparency
  image(img, 50, 0)
end
def setup
  img = loadImage("fruit.png")
  image(img, 0, 0)
  tint(255, 126)   # Apply transparency without changing color
  image(img, 50, 0)
end

構文

戻値