[proFit-list] Color coding in ProFit scripts
Jan Lagerwall
jan_lagerwall at mac.com
Thu Feb 12 01:41:01 CST 2009
Greetings,
I'm trying to program an optics script where the data are plotted in
real color (for the interested, I want to have ProFit produce a Michel-
Levy birefringence color chart) but I have some trouble getting from
light wavelength to the corresponding R,G,B-values that I should send
to SetLineColor. I found a quite simple algorithm at http://www.efg2.com/Lab/ScienceAndEngineering/Spectra.htm
but this first of all produces only 8-bit color, so the greater
color depth of ProFit isn't used, second, the results aren't
completely convincing. This is in particular because I need to mix the
colors (I am running a loop over wavelengths, calculating the
intensity for each color from 380nm to 780nm, and then summing the
corresponding RGB values together, obviously normalizing the result
before plotting).
Does anyone have any experience in getting from light wavelength to
RGB and how to program color mixing? While my current script is an OK
first approximation, any help to further improve it would be greatly
appreciated.
Thanks
Jan
More information about the proFit-list
mailing list