Struct ExcelColor
An opaque RGB color.
public readonly record struct ExcelColor : IEquatable<ExcelColor>
- Implements
- Inherited Members
Constructors
ExcelColor(byte, byte, byte)
An opaque RGB color.
public ExcelColor(byte R, byte G, byte B)
Parameters
Properties
B
The blue component.
public byte B { get; init; }
Property Value
G
The green component.
public byte G { get; init; }
Property Value
R
The red component.
public byte R { get; init; }
Property Value
Methods
FromRgb(int)
Creates a color from a 0xRRGGBB value.
public static ExcelColor FromRgb(int rgb)
Parameters
rgbintThe packed color, from 0 to 0xFFFFFF.
Returns
- ExcelColor
The color.
Exceptions
- ArgumentOutOfRangeException
rgbis outside 0 to 0xFFFFFF.