view the rest of the comments
Ask Science
Ask a science question, get a science answer.
Community Rules
Rule 1: Be respectful and inclusive.
Treat others with respect, and maintain a positive atmosphere.
Rule 2: No harassment, hate speech, bigotry, or trolling.
Avoid any form of harassment, hate speech, bigotry, or offensive behavior.
Rule 3: Engage in constructive discussions.
Contribute to meaningful and constructive discussions that enhance scientific understanding.
Rule 4: No AI-generated answers.
Strictly prohibit the use of AI-generated answers. Providing answers generated by AI systems is not allowed and may result in a ban.
Rule 5: Follow guidelines and moderators' instructions.
Adhere to community guidelines and comply with instructions given by moderators.
Rule 6: Use appropriate language and tone.
Communicate using suitable language and maintain a professional and respectful tone.
Rule 7: Report violations.
Report any violations of the community rules to the moderators for appropriate action.
Rule 8: Foster a continuous learning environment.
Encourage a continuous learning environment where members can share knowledge and engage in scientific discussions.
Rule 9: Source required for answers.
Provide credible sources for answers. Failure to include a source may result in the removal of the answer to ensure information reliability.
By adhering to these rules, we create a welcoming and informative environment where science-related questions receive accurate and credible answers. Thank you for your cooperation in making the Ask Science community a valuable resource for scientific knowledge.
We retain the discretion to modify the rules as we deem necessary.
Low pressure sodium lamps have a pretty sharp spectrum: https://en.wikipedia.org/wiki/Sodium-vapor_lamp
Looking at the color spectrum, have you just tried and colors in the green to blue to purple range? I don’t think you need a Python library for this, I think you need to experiment. There’s a lot of dependence on the reflectivity of the material you’re looking at in addition to the color you see under sunlight or even indoor light with broad spectrum.
Try blue and green and see if both look the same under the lamp.
I was hoping I could avoid experimenting. CMYK light responses should be well controlled/documented, no?
Thinking about this more , you probably want this to develop a curve in your color space that represents something with constant CMYK values for your chosen light source.
https://python-colormath.readthedocs.io/en/latest/conversions.html
E.g. your sodium light is 100% yellow, 10ish % magenta. Any color that varies cyan from 0%-100% and black from 0%-100% should presumably not reflect any additional color information (since the source light doesn’t have any cyan and black is just giving brightness)
I also think this means that as long as you hold Y and M constant, you can vary cyan and black for your comparison colors that will look the same. If you try to vary cyan and yellow or magenta at the same time then your effect probably won’t work.
This is tricky because you have multiple curves in the color space that are valid when just considering a single wavelength. The reality is, your lamp emits a spectrum of light (sharp, but still has a width). There’s also the variability in perception. But I’m not sure what the “bandwidth” of our eyes is and what color resolution humans are capable of detecting.