Color by Wavelength in Wolfram Mathematica: Easy Guide & Tips

  • Context: Mathematica 
  • Thread starter Thread starter Vrbic
  • Start date Start date
  • Tags Tags
    Color Wavelength
Click For Summary

Discussion Overview

The discussion revolves around the possibility of setting colors in Wolfram Mathematica based on specific wavelengths of light. Participants explore methods for converting wavelengths to RGB values, seeking guidance on existing functions or algorithms.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested

Main Points Raised

  • One participant inquires about the ability to set object colors in Mathematica using wavelength values, expressing difficulty in finding relevant information.
  • Another participant suggests finding an algorithm to convert wavelengths to RGB values and provides several external links for reference.
  • A later reply reiterates the suggestion to convert wavelengths to RGB and mentions a specific Mathematica function, "VisibleSpectrum," but expresses uncertainty about its usage.
  • Another participant shares a link to an example code that demonstrates how to use "VisibleSpectrum" to convert wavelengths to RGB values.

Areas of Agreement / Disagreement

Participants generally agree on the need to convert wavelengths to RGB values, but there is no consensus on the existence of a straightforward built-in function in Mathematica for this purpose. Uncertainty remains regarding the use of "VisibleSpectrum."

Contextual Notes

Some participants express limitations in their understanding of the available functions and algorithms, indicating a need for clearer guidance on how to implement the conversion process.

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 ·
Replies
2
Views
4K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 8 ·
Replies
8
Views
10K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
1K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K