-
Notifications
You must be signed in to change notification settings - Fork 1
Color
GhostglowDev edited this page Mar 21, 2024
·
2 revisions
local clr = require "ghostutil.color"
-
WHITE
(0xFFFFFFFF) -
GRAY
(0xFF808080) -
BLACK
(0xFF000000)
-
RED
(0xFFFF0000) -
BLUE
(0xFF0000FF) -
GREEN
(0xFF008000) -
PINK
(0xFFFFC0CB) -
MAGENTA
(0xFFFF00FF) -
PURPLE
(0xFF800080) -
LIME
(0xFF00FF00) -
YELLOW
(0xFFFFFF00) -
ORANGE
(0xFFFFA500) -
CYAN
(0xFF00FFFF)
-
sprite
: Object / Sprite -
value
: A color in HEX (0xAARRGGBB)
clr.setSpriteColor("dad", clr.RED);
-
sprite
: Object / Sprite
clr.getSpriteColor("dad");
-- You can use it like this
setProperty("boyfriend.color", clr.getSpriteColor("dad"));
-
sprite
: Object / Sprite -
multipliers
,offsets
{
red:Float,
green:Float,
blue:Float,
alpha:Float
}
-- this makes dad completely white
clr.setSpriteColorTransform("dad", {255, 255, 255, 1}, {255, 255, 255, 1});
-
r
: Red value -
g
: Green value -
b
: Blue value
setProperty("boyfriend.color", clr.rgbToHex(255, 0, 0));
-- This is RED thus, FF0000
Reading this wiki is recommended before using GhostUtil