Up
_colorNew
_colorNew creates a new Color object.
This object should be destroyed when it is no longer needed.
Prototype : fun [Chn I I I I] ObjColor
- Chn : a channel, owner of the created Color object.
Typically, it is the current channel, _channel.
- I : the red composant. The value should be between 0 and 65535 (otherise, it will be clamped).
- I : the green composant. The value should be between 0 and 65535 (otherise, it will be clamped).
- I : the blue composant. The value should be between 0 and 65535 (otherise, it will be clamped).
- I : the alpha composant. The value should be between 0 and 65535 (otherise, it will be clamped).
- Return : ObjColor : the new Color object or nil if an error occurs
Note : integer value or hexadecimal value are accepted.
See also
Example
typeof color = ObjColor;;
fun main ()=
_showconsole;
set color = _colorNew _channel 65365 0xFFFF 0xFFFF; // yellow opaque
...
0;;