de.grogra.imp3d.spectral
public final class Wavelength extends java.lang.Object
| Constructor and Description |
|---|
Wavelength() |
| Modifier and Type | Method and Description |
|---|---|
static int |
color2int(java.awt.Color c)
Converts a given color to its integer value.
|
static int |
color2int(int red,
int green,
int blue)
Converts a given color represented by its RGB color values to its integer value.
|
static java.awt.Color |
fColor(float freq,
float gamma)
Creates a Color object given the frequency instead of the usual RGB or HSB values.
|
static java.awt.Color |
wvColor(float wl,
float gamma)
Creates a Color object given the wavelength instead of the usual RGB or HSB values.
|
public static final int color2int(java.awt.Color c)
c - colorpublic static final int color2int(int red,
int green,
int blue)
red - channel [0,255] of the default sRGB spacegreen - channel [0,255] of the default sRGB spaceblue - channel [0,255] of the default sRGB spacepublic static final java.awt.Color fColor(float freq,
float gamma)
freq - frequency of the light in Terahertz (10.0e12 Hz) Will show up black outside the range 384..789
TeraHertz.gamma - 0.0 .. 1.0 intensity.public static final java.awt.Color wvColor(float wl,
float gamma)
wl - wavelength of the light in nanometers. Will show up black outside the range 380..780 nanometers.gamma - 0.0 .. 1.0 intensity.