Package rekit.primitives.image
Class RGBAColor
java.lang.Object
rekit.primitives.image.RGBAColor
@ClassParser(RGBAColorParser.class)
public final class RGBAColor
extends Object
implements Cloneable, Operable<RGBAColor>
This class defines a Color with RGBA channels.
- Author:
- Dominik Fuchss
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
red
public final int redThe red channel. -
green
public final int greenThe green channel. -
blue
public final int blueThe blue channel. -
alpha
public final int alphaThe alpha channel.
-
-
Constructor Details
-
RGBAColor
public RGBAColor(int r, int g, int b, int a) Create a new RGBA Color.- Parameters:
r
- the red channelg
- the green channelb
- the blue channela
- the alpha channel
-
RGBAColor
public RGBAColor(int r, int g, int b) Create a new RGBA Color (Alpha := 255).- Parameters:
r
- the red channelg
- the green channelb
- the blue channel
-
RGBAColor
public RGBAColor(int color) Create a color by an int coded ARGB color.- Parameters:
color
- the ARGB color
-
-
Method Details
-
darken
Darken the color.- Parameters:
p
- the percentage- Returns:
- the darken color
-
hashCode
public int hashCode() -
equals
-
toString
-
clone
-
scalar
Description copied from interface:Operable
Apply scalar. -
multiply
Description copied from interface:Operable
Apply multiplicand. -
add
Description copied from interface:Operable
Apply summand. -
sub
Description copied from interface:Operable
Apply subtrahend. -
get
Description copied from interface:Operable
Always ! Enter the code:return this;
-