I picked up a low pressure sodium lamp and am working on a Halloween demonstration. I’m hoping to make a display that appears one way under normal light, but looks totally different under the monochromatic 589nm sodium vapor light.

So basically, I’m looking to generate a color wheel where I pick a shade of gray and get a list of colors that would look that gray under sodium vapor light.

…I feel like there must be a Python library for thing or something…

  • pbbananaman@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    1 year ago

    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.

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I was hoping I could avoid experimenting. CMYK light responses should be well controlled/documented, no?

      • pbbananaman@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        1 year ago

        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.