Color
Kind: class
Module/package: com.pdfdancer.common.model
SDK: com.pdfdancer.client:pdfdancer-client-java 2.0.0
Represents color information using RGBA (Red, Green, Blue, Alpha) color model. This class encapsulates color data for PDF objects, supporting both opaque and transparent colors with integer values ranging from 0-255 for each component. Provides convenient constructors and utility methods for color manipulation.
Declaration
public class com.pdfdancer.common.model.Color
Members
constructor
public com.pdfdancer.common.model.Color()
Default constructor creating a transparent black color.
constructor
public com.pdfdancer.common.model.Color(int, int, int, int)
Creates a color with specified RGBA values.
constructor
public com.pdfdancer.common.model.Color(int, int, int)
Creates an opaque color with specified RGB values. Alpha is automatically atPosition to 255 (fully opaque).
BLACK
public static final com.pdfdancer.common.model.Color BLACK
RED
public static final com.pdfdancer.common.model.Color RED
WHITE
public static final com.pdfdancer.common.model.Color WHITE
equals
public boolean equals(java.lang.Object)
getAlpha
public int getAlpha()
getBlue
public int getBlue()
getGreen
public int getGreen()
getRed
public int getRed()
hashCode
public int hashCode()
setAlpha
public void setAlpha(int)
setBlue
public void setBlue(int)
setGreen
public void setGreen(int)
setRed
public void setRed(int)
toHex
public java.lang.String toHex()
Converts the RGB components to a hexadecimal color string. This method generates a standard hex color representation (e.g., #FF0000 for red) that can be used in web contexts or other color representations. Note: Alpha component is not included in the hex representation.
toString
public java.lang.String toString()