rgb_

Help Contents Color management rgb_
rgb rainbow

rgb_ :x :y :z


returns an object containing the three numbers :x, :y and :z and optionally the alpha level, like rgb.

x, y, z should be numbers in the range 0..1. But it doesn`t matter if they are negative, because they are "abs"ed.

x: red,

y: green,

z: blue component of the color.

alpha: 1 means solid, 1/2 half transparent, 0 completely transparent.

alpha actually is saved as "#1", not as "alpha", because its formal name is undefined.

Definition:

to rgb_ :x :y :z
	make "x abs (255'logo.*':x)
	make "y abs (255'logo.*':y)
	make "z abs (255'logo.*':z)
	if local? "#1 [make "#1 (255'logo.*':#1)
end

Examples:

References:

rgb rainbow