Class Spectrum


  • public class Spectrum
    extends java.lang.Object
    A class for calulating the colors of the spectrum.
    • Constructor Summary

      Constructors 
      Constructor Description
      Spectrum()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int wavelengthToRGB​(float wavelength)
      Convert a wavelength to an RGB value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Spectrum

        public Spectrum()
    • Method Detail

      • wavelengthToRGB

        public static int wavelengthToRGB​(float wavelength)
        Convert a wavelength to an RGB value.
        Parameters:
        wavelength - wavelength in nanometres
        Returns:
        the RGB value