Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- color kleur;
- int rood, blauw;
- void setup()
- {
- size(300, 300);
- }
- void draw() {
- fill(kleur);
- rect(135, 135, 40, 40);
- textSize(20);
- text("Lekker kleuren?",15,280);} //tekst
- void mouseDragged()
- {
- rood = int(255*mouseX/width); //rode kleur
- blauw = int(255*mouseY/width);; //blauwe kleur
- kleur = color(rood,0,blauw); //beplaing Kleur vierkant
- }
Advertisement
Add Comment
Please, Sign In to add comment