Skip to content

Commit

Permalink
Update WavelengthToColorConverter.java
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcross authored Oct 14, 2024
1 parent d93bea6 commit dd7cd5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Uses the CIE color-matching algorithm. Taken from https://www.baeldung.com/cs/rgb-color-light-frequency (accessed 2024-10-14)
*/
public class WavelengthToColorConverter {
public static Color wavelengthToColor(double wavelengthNM) {
public static Color convert(double wavelengthNM) {
// Calculating X value
double factorXt1 = wavelengthNM < 442 ? 0.0624 : 0.0374;
double Xt1 = (wavelengthNM - 442) * factorXt1;
Expand Down

0 comments on commit dd7cd5e

Please sign in to comment.