Mathematica Color by Wavelength in Wolfram Mathematica: Easy Guide & Tips

  • Thread starter Thread starter Vrbic
  • Start date Start date
  • Tags Tags
    Color Wavelength
Click For Summary
In Wolfram Mathematica, users can convert a wavelength to an RGB value to set colors for objects, though there isn't a built-in function specifically for this purpose. Resources such as algorithms and example codes are available online to assist with the conversion process. The "VisibleSpectrum" function in Mathematica can be utilized, but its application may not be straightforward for all users. Example codes demonstrating the conversion from wavelength to RGB are provided in various online demonstrations. Ultimately, while it may require some effort, transforming wavelengths to RGB values is achievable with the right resources.
Vrbic
Messages
400
Reaction score
18
Hello,
I'm wonder if is possible in Wolfram Mathematica to fill some object or just set a color of object by a entering a wavelength, i.e. I write 450 and the line will be blue etc. Please advise me, I didn't find anything useful.
Thank you all.
 
Physics news on Phys.org
DrClaude said:
What you can do is to try and find an algorithm to convert a wavelength to a RGB value.

http://www.efg2.com/Lab/ScienceAndEngineering/Spectra.htm
https://stackoverflow.com/questions/1472514/convert-light-frequency-to-rgb
http://www.noah.org/wiki/Wavelength_to_RGB_in_Python
http://www.physics.sfasu.edu/astro/color/spectra.html
Ok, thank you. This possibility I took as a last one. I hoped there exists some special function on it. I found this http://reference.wolfram.com/language/guide/ColorSchemes.html , but honestly I don't know what is it for, or how use this "VisibleSpectrum". If there is no other way I will transform wavelength to RGB but it also won't be ease...I guess :-)
 

Similar threads

Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 8 ·
Replies
8
Views
10K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 17 ·
Replies
17
Views
2K