We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've been looking through the core documentation for the definition of the color
datatype. I cannot seem to find it. I know the traditional way to store a 3-value color is in an int, and that you can manually set a color
to a hex value, which would suggest it's a 4 byte int. Further, the color()
assignment methods in PApplet return integers, for example.
So is color really just an int? Does the preprocessor just change declarations of color
to int
? Thanks.
Answers
Hit CTRL + SHIFT + E in order to export any sketch w/ keyword
color
on it.Check the generated ".java" file and you'll see all
color
keywords were transpiled toint
. ;))Thanks, I guess it's a clever way to get around the lack of typedefs