Package org.sunflow.image
Class Color
- java.lang.Object
-
- org.sunflow.image.Color
-
public final class Color extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
add(Color c)
static Color
add(Color c1, Color c2)
static Color
add(Color c1, Color c2, Color dest)
static Color
black()
static Color
blend(Color c1, Color c2, float b)
static Color
blend(Color c1, Color c2, float b, Color dest)
static Color
blend(Color c1, Color c2, Color b)
static Color
blend(Color c1, Color c2, Color b, Color dest)
Color
clamp(float min, float max)
Color
constrainRGB()
Color
copy()
Color
div(Color c)
static Color
div(Color c1, Color c2)
static Color
div(Color c1, Color c2, Color dest)
Color
exp()
float
getAverage()
float
getLuminance()
float
getMax()
float
getMin()
float[]
getRGB()
static boolean
hasContrast(Color c1, Color c2, float thresh)
boolean
isBlack()
boolean
isInf()
boolean
isNan()
boolean
isWhite()
Color
madd(float s, Color c)
Color
madd(Color s, Color c)
Color
mul(float s)
static Color
mul(float s, Color c)
static Color
mul(float s, Color c, Color dest)
Color
mul(Color c)
static Color
mul(Color c1, Color c2)
static Color
mul(Color c1, Color c2, Color dest)
Color
opposite()
Color
set(float r, float g, float b)
Color
set(Color c)
Color
setRGB(int rgb)
Color
setRGBE(int rgbe)
Color
sub(Color c)
static Color
sub(Color c1, Color c2)
static Color
sub(Color c1, Color c2, Color dest)
Color
toLinear()
Color
toNonLinear()
int
toRGB()
int
toRGBA(float a)
int
toRGBE()
java.lang.String
toString()
static Color
white()
-
-
-
Field Detail
-
NATIVE_SPACE
public static final RGBSpace NATIVE_SPACE
-
BLACK
public static final Color BLACK
-
WHITE
public static final Color WHITE
-
RED
public static final Color RED
-
GREEN
public static final Color GREEN
-
BLUE
public static final Color BLUE
-
YELLOW
public static final Color YELLOW
-
CYAN
public static final Color CYAN
-
MAGENTA
public static final Color MAGENTA
-
GRAY
public static final Color GRAY
-
-
Constructor Detail
-
Color
public Color()
-
Color
public Color(float gray)
-
Color
public Color(float r, float g, float b)
-
Color
public Color(Color c)
-
Color
public Color(int rgb)
-
-
Method Detail
-
black
public static Color black()
-
white
public static Color white()
-
toNonLinear
public Color toNonLinear()
-
toLinear
public Color toLinear()
-
copy
public Color copy()
-
set
public final Color set(float r, float g, float b)
-
setRGB
public final Color setRGB(int rgb)
-
setRGBE
public final Color setRGBE(int rgbe)
-
isBlack
public final boolean isBlack()
-
isWhite
public boolean isWhite()
-
getLuminance
public final float getLuminance()
-
getMin
public final float getMin()
-
getMax
public final float getMax()
-
getAverage
public final float getAverage()
-
getRGB
public final float[] getRGB()
-
toRGB
public final int toRGB()
-
toRGBA
public final int toRGBA(float a)
-
toRGBE
public final int toRGBE()
-
constrainRGB
public final Color constrainRGB()
-
isNan
public final boolean isNan()
-
isInf
public final boolean isInf()
-
mul
public final Color mul(float s)
-
exp
public final Color exp()
-
opposite
public final Color opposite()
-
clamp
public final Color clamp(float min, float max)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-