--@TBCONFIG INFO: Tone
--@TBCONFIG INFO: Revision 1
--@TBCONFIG INFO:  
--@TBCONFIG SLIDER: Tone 1 Hue, 100
--@TBCONFIG SLIDER: Tone 1 Saturation, 90
--@TBCONFIG SLIDER: Tone 1 Luminance, 25

local Tone1LumRatio = (1.0 - sliderVal3) / 1.0

local Tone1Hue = sliderVal1 * 360
local Tone1Sat = sliderVal2
local Tone1Lum = sliderVal3

for y = 0, height - 1 do
  for x = 0, width - 1 do
    local h, s, l = get_hsl(x, y)
      set_hsl(x, y, Tone1Hue, Tone1Sat, Tone1Lum + (l * Tone1LumRatio))
  end
end
