Table of Contents

Method GetAttributeForRole

Namespace
Terminal.Gui.Drawing
Assembly
Terminal.Gui.dll

GetAttributeForRole(VisualRole, Attribute?)

Gets the Attribute associated with a specified VisualRole, applying inheritance rules for attributes not explicitly set.

public Attribute GetAttributeForRole(VisualRole role, Attribute? defaultTerminalColors = null)

Parameters

role VisualRole

The semantic VisualRole describing the element being rendered.

defaultTerminalColors Attribute?

The terminal's actual default foreground/background colors (queried via OSC 10/11), used to resolve None during color derivation. If null, falls back to White/Black.

Returns

Attribute

The corresponding Attribute from the Scheme, possibly derived if not explicitly set.

GetAttributeForRole(string)

Gets the Attribute associated with a specified VisualRole string.

public Attribute GetAttributeForRole(string roleName)

Parameters

roleName string

The name of the VisualRole describing the element being rendered.

Returns

Attribute

The corresponding Attribute from the Scheme.