Module:Sandbox/AlexNB/nmColor: Difference between revisions

Content deleted Content added
AlexNB (talk | contribs)
No edit summary
AlexNB (talk | contribs)
No edit summary
 
(20 intermediate revisions by the same user not shown)
Line 95:
end
 
local minAntiMagenta = 540550
local maxAntiMagenta = 570
 
Line 108:
local bias_BLUE = (wavelength_abs - minAntiMagenta)/widthAntiMagenta
local bias_RED = (maxAntiMagenta - wavelength_abs)/widthAntiMagenta
nm2RGB(absorption_to_visible(minAntiMagenta)700, false)
redvalue_RED = redvalue*bias_RED*bias_RED
bluevalue_RED = bluevalue*bias_RED*bias_RED
greenvalue_RED = greenvalue*bias_RED*bias_RED
nm2RGB(absorption_to_visible(maxAntiMagenta)400, false)
redvalue_BLUE = redvalue*bias_BLUE*bias_BLUE
bluevalue_BLUE = bluevalue*bias_BLUE*bias_BLUE
greenvalue_BLUE = greenvalue*bias_BLUE*bias_BLUE
redvalue = 0.6+ 0.4*(redvalue_RED + redvalue_BLUE)
bluevalue = 0.7 + 0.3*(bluevalue_RED + bluevalue_BLUE)
greenvalue = greenvalue_RED + greenvalue_BLUE
end