【GAMEMAKER】Get Color

 Information about object: objController

Sprite: sprController
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
set variable Color to 0
Step Event:
execute code:

Color=draw_getpixel(mouse_x,mouse_y)
Draw Event:
execute code:

draw_text(10,10,"Color="+string(Color));
r=floor(Color mod 256);
g=floor((Color/256)mod 256);
b=floor(Color/65536);
draw_text(10,30,"Red  ="+string(r));
draw_text(10,50,"Green="+string(g));
draw_text(10,70,"Blue ="+string(b));

pen_color=make_color_rgb(r,g,b);
brush_color=make_color_rgb(r,g,b);
draw_rectangle(10,300,50,400, true);
Information about object: objColorBar
Sprite: sprColorBar
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Information about object: objColorBar2
Sprite: sprColorBar2
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object

No comments:

My New Favorite Music Genre Is Polish Noir

These 10 artists create music that is mystical, melancholy, magical, and more. ͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏     ­͏    ...

Contact Form

Name

Email *

Message *