>rgba ( color -- rgba )
Colors

Prev:<rgba> ( red green blue alpha -- rgba )
Next:>rgba-components ( object -- r g b a )


Vocabulary
colors

Inputs and outputs
colora color
rgbaa rgba


Generic word contract
Converts a color to an RGBA color.

Definition

GENERIC: >rgba ( color -- rgba )


Methods


































M: xyza >rgba
[
[ x>> ] [ y>> ] [ z>> ] tri load-local load-local
load-local 0 get-local 3.2404542 *
-1 get-local -1.5371385 * -2 get-local -0.4985314 * + +
0 get-local -0.969266 * -1 get-local 1.8760108 *
-2 get-local 0.041556 * + + 0 get-local 0.0556434 *
-1 get-local -0.2040259 * -2 get-local 1.0572252 * + +
[ srgb-compand 0.0 1.0 clamp ] 3 drop-locals tri@
] [ alpha>> ] bi <rgba> ;



M: yiqa >rgba
{ [ y>> ] [ in-phase>> ] [ quadrature>> ] [ alpha>> ] }
cleave [
[
[ 0.9468822170900693 * ] [ 0.6235565819861433 * ]
bi* + +
] [
[ 0.2747876462989783 * ] [ 0.6356910791873801 * ]
bi* + -
] [
[ 1.108545034642032 * ] [ 1.709006928406467 * ] bi*
- -
] 3tri [ 0.0 1.0 clamp ] tri@
] dip <rgba> ; inline