to-rgb-bytes

gabbapeople/color/to-rgb-bytes

Destructs a color value into red, green, and blue components encoded as byte values
to-rgb-bytes
@/to-rgb-bytes
Destructs a color value into red, green, and blue components encoded as byte values
IN@/color
to-rgb-bytes
IN
R
G
B
Bbyte
Blue
Gbyte
Green
Rbyte
Red
To use the node in your project you should have the gabbapeople/color library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

struct State {
};

// clang-format off
{{ GENERATED_CODE }}
// clang-format on

void evaluate(Context ctx) {
    auto color = getValue<input_IN>(ctx);
    emitValue<output_R>(ctx, color.r);
    emitValue<output_G>(ctx, color.g);
    emitValue<output_B>(ctx, color.b);
}