Content deleted Content added
adding magentas (test) |
No edit summary |
||
(48 intermediate revisions by the same user not shown) | |||
Line 95:
end
local minAntiMagenta =
local maxAntiMagenta = 570
Line 105:
local bluevalue_BLUE
local greenvalue_BLUE
local widthAntiMagenta = maxAntiMagenta - minAntiMagenta
local bias_BLUE = (wavelength_abs - minAntiMagenta)/widthAntiMagenta
redvalue_RED = redvalue▼
local bias_RED = (maxAntiMagenta - wavelength_abs)/widthAntiMagenta
bluevalue_RED = bluevalue▼
nm2RGB(700, false)
greenvalue_RED = greenvalue▼
▲ redvalue_RED = redvalue*bias_RED
▲ bluevalue_RED = bluevalue*bias_RED
redvalue_BLUE = redvalue▼
▲ greenvalue_RED = greenvalue*bias_RED
bluevalue_BLUE = bluevalue▼
nm2RGB(400, false)
greenvalue_BLUE = greenvalue▼
▲ redvalue_BLUE = redvalue*bias_BLUE
redvalue = (redvalue_RED + redvalue_BLUE)/2▼
▲ bluevalue_BLUE = bluevalue*bias_BLUE
bluevalue = (bluevalue_RED + bluevalue_BLUE)/2▼
▲ greenvalue_BLUE = greenvalue*bias_BLUE
greenvalue = (greenvalue_RED + greenvalue_BLUE)/2▼
end
Line 122 ⟶ 125:
local wavelength = tonumber(frame.args[1])
-- adding magentas to smoothen red->blue transition. Trying 540..570 nm
if (wavelength>=minAntiMagenta) and (wavelength<=maxAntiMagenta) then
end
local result='#' .. string.format("%.2X%.2X%.2X", 255*redvalue, 255*greenvalue, 255*bluevalue)
|