Scratch for Java

Stage::setColor()

Set the color.

Examples

import org.openpatch.scratch.*;

public class StageSetColor {
  public StageSetColor() {
    Stage myStage = new Stage(600, 240);
    myStage.wait(2000);
    myStage.setColor(200);
    myStage.wait(2000);
    myStage.exit();
  }

  public static void main(String[] args) {
    new StageSetColor();
  }
}

View on GitHub

Syntax

Java

.setColor(hue), .setColor(r,g,b)

Scratch

Parameters

NameData TypeDescription
huefloatA hue value in the range of 0 ... 255
rintA red value in the range of 0 ... 255
gintA green value in the range of 0 ... 255
bintA blue value in the range of 0 ... 255

Return

void