Constructs a new AcCmColor.
Initial color method (defaults to ByColor)
Optionalvalue: numberInternal packed value
Gets the blue component (0–255).
Gets the AutoCAD Color Index (ACI), or undefined if not ByACI, ByBlock, or ByLayer.
Sets the AutoCAD Color Index (0–256).
ByBlockByLayerByACIACI index
Gets the current color method.
Sets the color method.
Note: Changing the method does not modify _value.
Gets the color name.
For ByColor or ByACI, resolves the name via AcCmColorUtil.
For ByLayer or ByBlock, returns the corresponding string.
Sets the color by name.
Resolves the name to an RGB value via AcCmColorUtil.
Color name
Gets the CSS RGB color string (e.g., "rgb(255,0,255)").
Gets the green component (0–255).
Gets the hexadecimal representation of the color (e.g., "0xFF00FF").
Returns true if the color method is ByACI.
Returns true if the color method is ByBlock.
Returns true if the color method is ByColor (explicit RGB).
Returns true if the color method is ByLayer.
Gets the red component (0–255).
Gets the packed RGB value (0xRRGGBB).
ByColor, returns _value directlyByACI, converts index to RGB via AcCmColorUtilByLayer or ByBlock, returns _value directly
Represents an AutoCAD color. This class supports color methods: