Processing bug?

You can. The issue is just with color, because as @quark mentioned, this is replaced by int by the preprocessor. What that means is that when you click run, but before the program is compiled, the word color is replaced by int. And in this case it makes a mistake by replacing somewhere where it should not be replace.

If you work in Idea or Eclipse, there’s no preprocessor, so color can be used without this unexpected behavior.

Here a very confusing program to demonstrate that you can use unexpected variable names:

void setup() {
  Test t = new Test("long", "dashed");
  t.rect();
  println(t.line, "and", t.stroke);
  println(t.HALF_PI, t.ArrayList);
}

class Test {
  String line;
  String stroke;
  int HALF_PI = 3;
  int ArrayList = 4;
  void rect() {
    println("rect");
  }
  Test(String l, String s) {
    line = l;
    stroke = s;
  }
}

The names you can’t use are in the link I included above with the Java keywords.