From the p5 docs , it looks like there are methods to set components of color, but none to get them.
Given an object of class p5.Color, how do I get the red component of that color?
You can use the red()
, blue()
, and green()
functions.
More info can be found in the reference .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.