Rgba
From codeTank
Contents |
Description
rgba creates tables that holds color information. It is primarily used to specify color for image functions.
Arguments
sh: highlight: command not found
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
(error loading support language list)There are four optional arguments for rgba. Each argument specifies an amount of intensity per color channel. The four color channels are red, green, blue, and alpha. Each channel can range from 0 (void of color), to 255 (maximum color). alpha also ranges from 0 (completely transparent), to 255 (completely solid).
Examples:
sh: highlight: command not found
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
(error loading support language list)Note: As added convenience, rgba can also accept a table instead of a list of arguments.
Returns
rgba will return a table, with the appropriate values set. rgba is equivalent to:
sh: highlight: command not found
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
(error loading support language list)Example
sh: highlight: command not found
You need to specify a language like this: <source lang="html">...</source>
Supported languages for syntax highlighting:
(error loading support language list)Special Notes
Please be aware that the paint functions are not aware of the alpha channel. The paint library assumes every pixel is solid. Only the image library is aware of the alpha channel, and will use it correctly. Please also note that when an image is blitted to the paint device, that it's alpha will be quantized to either solid, or not-solid. For more information on this, see image.blit.

