Table of Contents

Struct ExcelColor

Namespace
ExcelReader.Core.Writer
Assembly
ExcelReader.Core.dll

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

R byte

The red component.

G byte

The green component.

B byte

The blue component.

Properties

B

The blue component.

public byte B { get; init; }

Property Value

byte

G

The green component.

public byte G { get; init; }

Property Value

byte

R

The red component.

public byte R { get; init; }

Property Value

byte

Methods

FromRgb(int)

Creates a color from a 0xRRGGBB value.

public static ExcelColor FromRgb(int rgb)

Parameters

rgb int

The packed color, from 0 to 0xFFFFFF.

Returns

ExcelColor

The color.

Exceptions

ArgumentOutOfRangeException

rgb is outside 0 to 0xFFFFFF.