Argb32Color

Inheritance: java.lang.Object

public class Argb32Color

Represents 32-bit color in ARGB format, with 8 bits per channel (Alpha, Red, Green, Blue). Supports transparency. Designed to be useful for (but not limited to) CSS operations. See more: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value

Constructors

Constructor Description
Argb32Color(int alpha, int red, int green, int blue) Private constructor, initializes ARGB channels.

Fields

Field Description
EMPTY
TRANSPARENT

Methods

Argb32Color(int alpha, int red, int green, int blue)

public Argb32Color(int alpha, int red, int green, int blue)

Private constructor, initializes ARGB channels.

Parameters:

Parameter Type Description
alpha int
red int
green int
blue int

EMPTY

public static final Argb32Color EMPTY

TRANSPARENT

public static final Argb32Color TRANSPARENT

toInternal()

public Argb32Color toInternal()

Returns: Argb32Color

fromInternal(Argb32Color color)

public static Argb32Color fromInternal(Argb32Color color)

Parameters:

Parameter Type Description
color com.groupdocs.htmlcss.drawing.Argb32Color

Returns: Argb32Color

fromRgba(int red, int green, int blue, int alpha)

public static Argb32Color fromRgba(int red, int green, int blue, int alpha)

Parameters:

Parameter Type Description
red int
green int
blue int
alpha int

Returns: Argb32Color

fromArgb(int argb)

public static Argb32Color fromArgb(int argb)

Parameters:

Parameter Type Description
argb int

Returns: Argb32Color

fromRgb(int red, int green, int blue)

public static Argb32Color fromRgb(int red, int green, int blue)

Parameters:

Parameter Type Description
red int
green int
blue int

Returns: Argb32Color

fromSingleValueRgb(int value)

public static Argb32Color fromSingleValueRgb(int value)

Parameters:

Parameter Type Description
value int

Returns: Argb32Color

getValue()

public int getValue()

Returns: int

getAlpha()

public int getAlpha()

Returns: int

getAlphaFraction()

public double getAlphaFraction()

Returns: double

getRed()

public int getRed()

Returns: int

getGreen()

public int getGreen()

Returns: int

getBlue()

public int getBlue()

Returns: int

getArgbValue()

public int getArgbValue()

Returns: int

isEmpty()

public boolean isEmpty()

Returns: boolean

isDefault()

public boolean isDefault()

Returns: boolean

isFullyTransparent()

public boolean isFullyTransparent()

Returns: boolean

isFullyOpaque()

public boolean isFullyOpaque()

Returns: boolean

isTranslucent()

public boolean isTranslucent()

Returns: boolean

getBrightness()

public float getBrightness()

Returns: float

getHue()

public float getHue()

Returns: float

getSaturation()

public float getSaturation()

Returns: float

toArgb()

public int toArgb()

Returns: int

toRGBA()

public String toRGBA()

Returns: java.lang.String

toRGB()

public String toRGB()

Returns: java.lang.String

toHexRGBA()

public String toHexRGBA()

Returns: java.lang.String

toHexRGB()

public String toHexRGB()

Returns: java.lang.String

toString()

public String toString()

Returns: java.lang.String

equals(Object obj)

public boolean equals(Object obj)

Parameters:

Parameter Type Description
obj java.lang.Object

Returns: boolean

hashCode()

public int hashCode()

Returns: int

equals(Argb32Color other)

public boolean equals(Argb32Color other)

Parameters:

Parameter Type Description
other Argb32Color

Returns: boolean

equals(Rgb24Color other)

public boolean equals(Rgb24Color other)

Parameters:

Parameter Type Description
other Rgb24Color

Returns: boolean

toRgb24Color()

public Rgb24Color toRgb24Color()

Returns: Rgb24Color

fromRgb24Color(Rgb24Color rgbColor)

public static Argb32Color fromRgb24Color(Rgb24Color rgbColor)

Parameters:

Parameter Type Description
rgbColor Rgb24Color

Returns: Argb32Color