I want to send a sting from processing js to javascript with the color to use in css. so formatted like: "rgb(255, 0, 0)" (or whatever color values).
no matter what i try i get this error:
Uncaught TypeError: number is not a function
I did several tests and it is always red(.... that is causing the error (and probably green and blue).
String getRowColor(int r) {
if (r > rows || r < 0) {
return null;
}
else {
color c= colors[r];
String cStr = "rgb(";
cStr += red(c)+", ";
cStr += green(c)+", ";
cStr += blue(c)+")";
return cStr;
}
}