X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=simple.lua;h=451146d1839638ae8a314bcc807497cca26200c0;hb=96cb6414f85e0ef4d660b7bd56267303e80fcd05;hp=10c9bebbd03da404670602bbcda7e5f90a7fb035;hpb=3e0e8a287f72b00ddb198c36f709d484b1a460a8;p=nageru diff --git a/simple.lua b/simple.lua index 10c9beb..451146d 100644 --- a/simple.lua +++ b/simple.lua @@ -77,6 +77,15 @@ function channel_signal(channel) end end +-- API ENTRY POINT +-- Called every frame. Returns the color (if any) to paint around the given +-- channel. Returns a CSS color (typically to mark live and preview signals); +-- "transparent" is allowed. +-- Will never be called for live (0) or preview (1). +function channel_color(channel) + return "transparent" +end + -- API ENTRY POINT -- Returns if a given channel supports setting white balance (starting from 2). -- Called only once for each channel, at the start of the program. @@ -89,9 +98,9 @@ end -- The color is in linear light (not sRGB gamma). function set_wb(channel, red, green, blue) if channel == 2 then - input_neutral_color[0] = { red, green, blue } - elseif channel == 3 then input_neutral_color[1] = { red, green, blue } + elseif channel == 3 then + input_neutral_color[2] = { red, green, blue } end end