colour

bradzilla84/arduino-tft-lib/colour

Set Colour's(pulse to update)(Check example for usage)Easy to Theme.
colour
@/colour
Set Colour's(pulse to update)(Check example for usage)Easy to Theme.
Rednumber
Red Colour 0 min, 1Max.
Greennumber
Green Colour 0 min, 1Max.
Bluenumber
Blue Colour 0 min, 1Max.
INITpulse
colour
OUT
Red
Green
Blue
INIT
OUT@/colour
To use the node in your project you should have the bradzilla84/arduino-tft-lib 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 {
    // this is a regular state related to the patch (i.e. constructor in this case)
};

struct Type {
    uint8_t Red;
    uint8_t Green;
    uint8_t Blue;
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {

    if (!isInputDirty<input_INIT>(ctx)){
        return;}


    uint8_t Red = getValue<input_Red>(ctx) * 255.f;
    uint8_t Green = getValue<input_Green>(ctx) * 255.f;
    uint8_t Blue = getValue<input_Blue>(ctx) * 255.f;
    Type Colour = { Red, Green, Blue };
    emitValue<output_OUT>(ctx, Colour);
}