Project

General

Profile

OpenSpace3D libs
OpenSpace 3D libraries for plugITs and OS3D developer

Functions

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

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

◆ G2DgetAplhaFromColor()

G2DgetAplhaFromColor ( )

get the alpha from a alpha color

Prototype: fun [I] I

Parameters
I: rgba or bgra color
Returns
I : alpha

◆ 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

◆ G2DmulColor()

G2DmulColor ( c1  ,
c2   
)

Multiply colors.

Prototype: fun [I I] I

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