Stage::setColor()
Set the color.
Examples

import org.openpatch.scratch.*;
public class StageSetColor {
public StageSetColor() {
Stage myStage = new Stage(254, 100);
myStage.wait(2000);
myStage.setColor(200);
myStage.wait(2000);
Window.getInstance().exit();
}
public static void main(String[] args) {
new StageSetColor();
}
}
Syntax
Java
.setColor(hue), .setColor(r,g,b)
Scratch
Parameters
Name | Data Type | Description |
---|---|---|
hue | float | A hue value in the range of 0 ... 255 |
r | int | A red value in the range of 0 ... 255 |
g | int | A green value in the range of 0 ... 255 |
b | int | A blue value in the range of 0 ... 255 |
Return
void