# RtfColor

RGB color entry used by an RTF document.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfColor.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L10)

**Implements**

`IRtfCloneable`

**Modifiers**

sealed

RGB color entry used by an RTF document.

## Inheritance

- object
- RtfColor

## Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 2

- Method [RtfDocument.GetColor](/api/rtf/officeimo-rtf-rtfdocument/#method-getcolor-int32)
- Property [RtfDocument.Colors](/api/rtf/officeimo-rtf-rtfdocument/#property-colors)

### Accepted by parameters 1

- Method [RtfLosslessEditor.SetColor](/api/rtf/officeimo-rtf-rtflosslesseditor/#method-setcolor-int32-officeimo-rtf-rtfcolor) parameter `color`

Filter members 

Show inherited

## Constructors

`public RtfColor(byte red, byte green, byte blue)` [#](#constructor-ctor-byte-byte-byte)

[RtfColor.cs:10](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L10)

Initializes a color.

Parameters

**red byte required**

**green byte required**

**blue byte required**

## Methods

`public override string ToString()` [#](#method-tostring)

[RtfColor.cs:38](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L38)

Returns a string that represents the current object.

Returns

`string` A string that represents the current object.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

## Properties

`public byte Red { get; }` [#](#property-red)

[RtfColor.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L17)

Red component.

`public byte Green { get; }` [#](#property-green)

[RtfColor.cs:20](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L20)

Green component.

`public byte Blue { get; }` [#](#property-blue)

[RtfColor.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L23)

Blue component.

`public bool IsAutomatic { get; internal set; }` [#](#property-isautomatic)

[RtfColor.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L26)

Whether this entry is an empty automatic-color slot rather than an explicit RGB color.

`public RtfThemeColor? ThemeColor { get; set; }` [#](#property-themecolor)

[RtfColor.cs:29](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L29)

Optional theme color token associated with this RGB color.

`public int? Tint { get; set; }` [#](#property-tint)

[RtfColor.cs:32](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L32)

Optional tint value from \ctint.

`public int? Shade { get; set; }` [#](#property-shade)

[RtfColor.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Model/RtfColor.cs#L35)

Optional shade value from \cshade.

<!-- PowerForge markdown artifact sha256:6B777A84AEF3886BAE889DE0850CCEABF5CA233D12911782F63D168BA19177C9 -->
