Show / Hide Table of Contents

# Class UIForegroundPayload

An SeString Payload representing a UI foreground color applied to following text payloads.

##### Inheritance

System.Object
Payload
UIForegroundPayload

##### Inherited Members

Payload.DataResolver
Payload.Dirty
Payload.Decode(BinaryReader)
Payload.Encode(Boolean)
Payload.START_BYTE
Payload.END_BYTE
Payload.GetInteger(BinaryReader)
Payload.MakeInteger(UInt32)
Payload.GetPackedIntegers(BinaryReader)
Payload.MakePackedInteger(UInt32, UInt32)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Dalamud.Game.Text.SeStringHandling.Payloads

###### Assembly: Dalamud.dll

##### Syntax

    public class UIForegroundPayload : Payload

### Constructors

| Improve this Doc View Source

#### UIForegroundPayload(UInt16)

Initializes a new instance of the UIForegroundPayload class. Creates a new UIForegroundPayload for the given UIColor key.

##### Declaration

    public UIForegroundPayload(ushort colorKey)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt16 | colorKey | A UIColor key.

### Properties

| Improve this Doc View Source

#### ColorKey

Gets or sets the color key used as a lookup in the UIColor table for this foreground color.

##### Declaration

    public ushort ColorKey { get; set; }

##### Property Value

Type | Description
--- | ---
System.UInt16 |

| Improve this Doc View Source

#### IsEnabled

Gets a value indicating whether or not this payload represents applying a foreground color, or disabling one.

##### Declaration

    public bool IsEnabled { get; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### RGB

Gets the Red/Green/Blue values for this foreground color, encoded as a typical hex color.

##### Declaration

    public uint RGB { get; }

##### Property Value

Type | Description
--- | ---
System.UInt32 |

| Improve this Doc View Source

#### Type

Gets the type of this payload.

##### Declaration

    public override PayloadType Type { get; }

##### Property Value

Type | Description
--- | ---
PayloadType |

##### Overrides

Payload.Type
| Improve this Doc View Source

#### UIColor

Gets a Lumina UIColor object representing this payload. The actual color data is at UIColor.UIForeground.

##### Declaration

    public UIColor UIColor { get; }

##### Property Value

Type | Description
--- | ---
UIColor |

##### Remarks

The value is evaluated lazily and cached.

| Improve this Doc View Source

#### UIForegroundOff

Gets a payload representing disabling foreground color on following text.

##### Declaration

    public static UIForegroundPayload UIForegroundOff { get; }

##### Property Value

Type | Description
--- | ---
UIForegroundPayload |

### Methods

| Improve this Doc View Source

#### DecodeImpl(BinaryReader, Int64)

Decodes a byte stream from the game into a payload object.

##### Declaration

    protected override void DecodeImpl(BinaryReader reader, long endOfStream)

##### Parameters

Type | Name | Description
--- | --- | ---
System.IO.BinaryReader | reader | A BinaryReader containing at least all the data for this payload.
System.Int64 | endOfStream | The location holding the end of the data for this payload.

##### Overrides

Payload.DecodeImpl(BinaryReader, Int64)
| Improve this Doc View Source

#### EncodeImpl()

Encodes the internal state of this payload into a byte[] suitable for sending to in-game handlers such as the chat log.

##### Declaration

    protected override byte[] EncodeImpl()

##### Returns

Type | Description
--- | ---
System.Byte[] | Encoded binary payload data suitable for use with in-game handlers.

##### Overrides

Payload.EncodeImpl()
| Improve this Doc View Source

#### ToString()

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String |

##### Overrides

System.Object.ToString()