color-rgb-bytes

gabbapeople/color/color-rgb-bytes

Constructs a color value from red, green, and blue components expressed as byte values. Use decimal (0d to 255d) or hexadecimal (00h to FFh) byte literals. For example, if a graphical editor shows a blue as “#287ec9” or “rgb(40, 126, 201)” use the following literals for R/G/B: 28h/7Eh/C9h or 40d/126d/201d
color-rgb-bytes
@/color-rgb-bytes
Constructs a color value from red, green, and blue components expressed as byte values. Use decimal (0d to 255d) or hexadecimal (00h to FFh) byte literals. For example, if a graphical editor shows a blue as “#287ec9” or “rgb(40, 126, 201)” use the following literals for R/G/B: 28h/7Eh/C9h or 40d/126d/201d
Rbyte
Red
Gbyte
Green
Bbyte
Blue
color-rgb-bytes
OUT
R
G
B
OUT@/color
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) {
    ValueType<output_OUT>::T obj;
    obj = { (uint8_t)getValue<input_R>(ctx), (uint8_t)getValue<input_G>(ctx), (uint8_t)getValue<input_B>(ctx) };
    emitValue<output_OUT>(ctx, obj);
}