Argb32Color
Leave feedback
On this page
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
| Constructor | Description |
|---|---|
| Argb32Color(int alpha, int red, int green, int blue) | Private constructor, initializes ARGB channels. |
| Field | Description |
|---|---|
| EMPTY | |
| TRANSPARENT |
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 |
public static final Argb32Color EMPTY
public static final Argb32Color TRANSPARENT
public Argb32Color toInternal()
Returns: Argb32Color
public static Argb32Color fromInternal(Argb32Color color)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| color | com.groupdocs.htmlcss.drawing.Argb32Color |
Returns: Argb32Color
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
public static Argb32Color fromArgb(int argb)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| argb | int |
Returns: Argb32Color
public static Argb32Color fromRgb(int red, int green, int blue)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| red | int | |
| green | int | |
| blue | int |
Returns: Argb32Color
public static Argb32Color fromSingleValueRgb(int value)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int |
Returns: Argb32Color
public int getValue()
Returns: int
public int getAlpha()
Returns: int
public double getAlphaFraction()
Returns: double
public int getRed()
Returns: int
public int getGreen()
Returns: int
public int getBlue()
Returns: int
public int getArgbValue()
Returns: int
public boolean isEmpty()
Returns: boolean
public boolean isDefault()
Returns: boolean
public boolean isFullyTransparent()
Returns: boolean
public boolean isFullyOpaque()
Returns: boolean
public boolean isTranslucent()
Returns: boolean
public float getBrightness()
Returns: float
public float getHue()
Returns: float
public float getSaturation()
Returns: float
public int toArgb()
Returns: int
public String toRGBA()
Returns: java.lang.String
public String toRGB()
Returns: java.lang.String
public String toHexRGBA()
Returns: java.lang.String
public String toHexRGB()
Returns: java.lang.String
public String toString()
Returns: java.lang.String
public boolean equals(Object obj)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object |
Returns: boolean
public int hashCode()
Returns: int
public boolean equals(Argb32Color other)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | Argb32Color |
Returns: boolean
public boolean equals(Rgb24Color other)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | Rgb24Color |
Returns: boolean
public Rgb24Color toRgb24Color()
Returns: Rgb24Color
public static Argb32Color fromRgb24Color(Rgb24Color rgbColor)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| rgbColor | Rgb24Color |
Returns: Argb32Color
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.