Lua Player Plus Vita
Documentation of lpp-vita
Color

Module that handles colors and their management. More...

Functions

int Color::new (int r, int g, int b, int a)
 Create a new color. More...
 
int Color::getR (int clr)
 Return the R channel value of a color. More...
 
int Color::getG (int clr)
 Return the G channel value of a color. More...
 
int Color::getB (int clr)
 Return the B channel value of a color. More...
 
int Color::getA (int clr)
 Return the A channel value of a color. More...
 

Detailed Description

Module that handles colors and their management.

Function Documentation

◆ new()

int Color::new ( int  r,
int  g,
int  b,
int  a 
)

Create a new color.

Usage example:
my_color = Color.new(255, 200, 100, 255)
Definition: luaColor.cpp:6
int new(int r, int g, int b, int a)
Create a new color.
Parameters
r- R channel value.
g- G channel value.
b- B channel value.
a- A channel value (optional).
Returns
The combined RGBA color.

◆ getR()

int Color::getR ( int  clr)

Return the R channel value of a color.

Usage example:
r = Color.getR(my_color)
int getR(int clr)
Return the R channel value of a color.
Parameters
clr- A color created with Color.new.
Returns
The R channel value of the color.

◆ getG()

int Color::getG ( int  clr)

Return the G channel value of a color.

Usage example:
g = Color.getG(my_color)
int getG(int clr)
Return the G channel value of a color.
Parameters
clr- A color created with Color.new.
Returns
The G channel value of the color.

◆ getB()

int Color::getB ( int  clr)

Return the B channel value of a color.

Usage example:
b = Color.getB(my_color)
int getB(int clr)
Return the B channel value of a color.
Parameters
clr- A color created with Color.new.
Returns
The B channel value of the color.

◆ getA()

int Color::getA ( int  clr)

Return the A channel value of a color.

Usage example:
a = Color.getA(my_color)
int getA(int clr)
Return the A channel value of a color.
Parameters
clr- A color created with Color.new.
Returns
The A channel value of the color.