public class Color4b extends Tuple4b implements Serializable
Note that Java defines a byte as a signed integer in the range [-128, 127]. However, colors are more typically represented by values in the range [0, 255]. Java 3D recognizes this and for color treats the bytes as if the range were [0, 255]---in other words, as if the bytes were unsigned.
Java 3D assumes that a linear (gamma-corrected) visual is used for all colors.
Constructor and Description |
---|
Color4b()
Constructs and initializes a Color4b to (0,0,0,0).
|
Color4b(byte[] c)
Constructs and initializes a Color4b from the array of length 4.
|
Color4b(byte b1,
byte b2,
byte b3,
byte b4)
Constructs and initializes a Color4b from the four specified values.
|
Color4b(Color color)
Constructs and initializes a Color4b from the specified AWT
Color object.
|
Color4b(Color4b c1)
Constructs and initializes a Color4b from the specified Color4b.
|
Color4b(Tuple4b t1)
Constructs and initializes a Color4b from the specified Tuple4b.
|
Modifier and Type | Method and Description |
---|---|
Color |
get()
Returns a new AWT color object initialized with the r,g,b,a
values of this Color4b object.
|
void |
set(Color color)
Sets the r,g,b,a values of this Color4b object to those of the
specified AWT Color object.
|
public Color4b(byte b1, byte b2, byte b3, byte b4)
b1
- the red color valueb2
- the green color valueb3
- the blue color valueb4
- the alpha valuepublic Color4b(byte[] c)
c
- the array of length 4 containing r, g, b, and alpha in orderpublic Color4b(Color4b c1)
c1
- the Color4b containing the initialization r,g,b,a
datapublic Color4b(Tuple4b t1)
t1
- the Tuple4b containing the initialization r,g,b,a
datapublic Color4b(Color color)
color
- the AWT color with which to initialize this
Color4b objectpublic Color4b()
public final void set(Color color)
color
- the AWT color to copy into this Color4b objectpublic final Color get()
Copyright © 2016–2022 SciJava. All rights reserved.