private static function setColors($wavelength, $rgb) {
        $red = $rgb["r"];
        $green = $rgb["g"];
        $blue = $rgb["b"];
        if ($wavelength >= 380 && $wavelength <= 439) {
            $red = - ($wavelength - 440.0) / (440.0 - 380.0);
            $green = 0.0;
            $blue = 1.0;
        } elseif ($wavelength >= 440 && $wavelength <= 489) {
            $red = 0.0;
            $green = ($wavelength - 440.0) / (490.0 - 440.0);
            $blue = 1.0;
        } elseif ($wavelength >= 490 && $wavelength <= 509) {
            $red = 0.0;
            $green = 1.0;
            $blue = - ($wavelength - 510.0) / (510.0 - 490.0);
        } elseif ($wavelength >= 510 && $wavelength <= 579) {
            $red = ($wavelength - 510.0) / (580.0 - 510.0);
            $green = 1.0;
            $blue = 0.0;
        } elseif ($wavelength >= 580 && $wavelength <= 644) {
            $red = 1.0;
            $green = - ($wavelength - 645.0) / (645.0 - 580.0);
            $blue = 0.0;
        } elseif ($wavelength >= 645 && $wavelength <= 780) {
            $red = 1.0;
            $green = 0.0;
            $blue = 0.0;
        } else {
            $red = 0.0;
            $green = 0.0;
            $blue = 0.0;
        }
        $rgb["r"] = $red;
        $rgb["g"] = $green;
        $rgb["b"] = $blue;
        return $rgb;
    }