how do you specify colour for just one piece of text and nothing else in the sketch?
in
Programming Questions
•
5 months ago
sorry real newbie here, just wondered how i can just make my text one colour without affecting the colour of my polygons?
- // display the customShape
void display() {
// get the pixel coordinates of the body
Vec2 pos = box2d.getBodyPixelCoord(body);
pushMatrix();
// translate to the position
translate(pos.x, pos.y);
noStroke();
// use the shape's custom color
fill(col);
text (s, r/1, r/2);
textSize(r/2);
color(#364B89);
1