Property Color
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Color
Gets or sets the colour of the entity, as AutoCAD's Color: its true colour (group 420, its book's name 430)
where it has one, else its colour index (62), BYLAYER where it gives none. It agrees with ColorIndex
and TrueColor, which read the same groups; a true colour carries the index nearest it, as
FromRgb(byte, byte, byte) gives it: orange, 0xFF8000, the index 30, whatever index the record writes beside it.
public DxfColor Color { get; set; }
Property Value
- DxfColor
Set, BYLAYER, BYBLOCK or a colour of the index writes the index and takes out a true colour and its name; a true colour writes its red, green and blue (420) and the index nearest it (62), as AutoCAD writes one, and takes out a name. A colour equal to the one read changes nothing.
Exceptions
- ArgumentNullException
Thrown when the colour set is null.
- ArgumentException
Thrown when the colour set is by pen, the foreground, a layer's off or frozen, or none, which an entity of DXF does not hold.
- InvalidOperationException
Thrown when the entity is erased, or a true colour is set on one of a file older than R2004 (AC1018).