Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/mianalysis/mia into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
sjcross committed Oct 16, 2024
2 parents 5e68161 + 02eaf96 commit 19f5a45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static LUT getLUT(String lookupTableName, double wavelengthNM) {
case LookupTables.RANDOM:
return LUTs.Random(true);
case LookupTables.FROM_WAVELENGTH:
Color colour = WavelengthToColorConverter.wavelengthToColor(wavelengthNM);
Color colour = WavelengthToColorConverter.convert(wavelengthNM);
return LUT.createLutFromColor(colour);
}
}
Expand Down

0 comments on commit 19f5a45

Please sign in to comment.