Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer
Loading...
Searching...
No Matches

Functions

 G2DformatHexaColor (s)
 Add missed colors in hexa format.
 
 G2DformatHexaColorI (c)
 format color to hexadecimal value
 
 G2Drgba2bgra (c)
 Convert an rgba or bgra color to rgba or bgra color.
 
 G2DgetAlphaFromColor (c)
 get the alpha from a alpha color
 
 G2DsetColorAlpha (c, a)
 set the alpha of a color
 
 G2Dbgra2bgr (c)
 Convert an bgra or bgr color.
 
 G2Drgba2rgb (c)
 Convert an rgba or rgb color.
 
 G2Dbgr2bgra (c, a)
 Convert an bgr to bgra color.
 
 G2Drgb2rgba (c, a)
 Convert an rgb to rgba color.
 
 G2Drgb2bgr (c)
 Convert an rgb or bgr color to rgb or bgr color.
 
 G2Dgetbgr (c)
 Get bgr color.
 
 G2Dgetrgb (c)
 Get rgb color.
 
 G2Dhsv2rgb (h, s, v)
 Convert an hsv color to rgb color.
 
 G2Drgb2hsv (c)
 Convert an rgb color to hsv color.
 
 G2DaddColor (c1, c2)
 Add colors.
 
 G2DsubColor (c1, c2)
 Substract colors.
 
 G2DmulColor (c1, c2)
 Multiply colors.
 
 G2DColorCoef (c1, coef)
 Multiply a Color by coef.
 

Detailed Description

Color manipulation

Function Documentation

◆ G2DformatHexaColor()

G2DformatHexaColor ( )

Add missed colors in hexa format.

Prototype: fun [S] S

Parameters
S: hexa color
Returns
S : formated color

◆ G2DformatHexaColorI()

G2DformatHexaColorI ( )

format color to hexadecimal value

Prototype: fun [I] S

Parameters
I: color
Returns
S : formated color

◆ G2Drgba2bgra()

G2Drgba2bgra ( )

Convert an rgba or bgra color to rgba or bgra color.

Prototype: fun [I] I

Parameters
I: rgba or bgra color
Returns
I : invert rgba or bgra color

◆ G2DgetAlphaFromColor()

G2DgetAlphaFromColor ( )

get the alpha from a alpha color

Prototype: fun [I] I

Parameters
I: rgba or bgra color
Returns
I : alpha

◆ G2DsetColorAlpha()

G2DsetColorAlpha ( ,
 
)

set the alpha of a color

Prototype: fun [I I] I

Parameters
I: rgba or bgra color
I: alpha
Returns
I : new color

◆ G2Dbgra2bgr()

G2Dbgra2bgr ( )

Convert an bgra or bgr color.

Prototype: fun [I] I

Parameters
I: bgr color
Returns
I : bgr color

◆ G2Drgba2rgb()

G2Drgba2rgb ( )

Convert an rgba or rgb color.

Prototype: fun [I] I

Parameters
I: rgba color
Returns
I : rgb color

◆ G2Dbgr2bgra()

G2Dbgr2bgra ( ,
 
)

Convert an bgr to bgra color.

Prototype: fun [I I] I

Parameters
I: bgr color
I: alpha
Returns
I : bgra color

◆ G2Drgb2rgba()

G2Drgb2rgba ( ,
 
)

Convert an rgb to rgba color.

Prototype: fun [I I] I

Parameters
I: rgb color
I: alpha
Returns
I : rgba color

◆ G2Drgb2bgr()

G2Drgb2bgr ( )

Convert an rgb or bgr color to rgb or bgr color.

Prototype: fun [I] I

Parameters
I: rgb or bgr color
Returns
I : invert rgb or bgr color

◆ G2Dgetbgr()

G2Dgetbgr ( )

Get bgr color.

Prototype: fun [I] [I I I]

Parameters
I: rgb color or nil for black
Returns
[I I I] : [b g r] tuple

◆ G2Dgetrgb()

G2Dgetrgb ( )

Get rgb color.

Prototype: fun [I] [I I I]

Parameters
I: rgb color
Returns
[I I I] : [r g b] tuple

◆ G2Dhsv2rgb()

G2Dhsv2rgb ( ,
,
 
)

Convert an hsv color to rgb color.

Prototype: fun [F F F] I

Parameters
F: h float
F: s float
F: v float
Returns
I : rgb color

◆ G2Drgb2hsv()

G2Drgb2hsv ( )

Convert an rgb color to hsv color.

Prototype: fun [I] [F F F]

Parameters
I: rgb color
Returns
[F F F] : [h s v] color

◆ G2DaddColor()

G2DaddColor ( c1  ,
c2   
)

Add colors.

Prototype: fun [I I] I

Parameters
I: color 1
I: color 2
Returns
I : new color

◆ G2DsubColor()

G2DsubColor ( c1  ,
c2   
)

Substract colors.

Prototype: fun [I I] I

Parameters
I: color 1
I: color 2
Returns
I : new color

◆ G2DmulColor()

G2DmulColor ( c1  ,
c2   
)

Multiply colors.

Prototype: fun [I I] I

Parameters
I: color 1
I: color 2
Returns
I : new color

◆ G2DColorCoef()

G2DColorCoef ( c1  ,
coef   
)

Multiply a Color by coef.

Prototype: fun [I F] I

Parameters
I: RGB color
F: coef
Returns
I : new color