Description :
This instruction converts a RGB color into a pre-defined color.
Parameters :
-
Red component of the color. Valid in the range [0,255].
-
Green component of the color. Valid in the range [0,255].
-
Blue component of the color. Valid in the range [0,255].
Return Value :
Notes :
Since transparency can only be applied to a pre-defined color, this instruction is typically used to convert a RGB color into a pre-defined color in order to then apply transparency to it.
For example, to make the RGB color (97,125,154) of a sprite transparent, you can use this instruction :
sprite.color.swap.stack (pixel.color.pack(97,125,154),COLOR_TRANSPARENCY)
Examples :
|