Table of Contents

Class TerminalColorDetector

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

Uses OSC 10/11 ANSI escape sequences to query the terminal's actual default foreground and background colors. Follows the same async callback pattern as SixelSupportDetector.

public class TerminalColorDetector
Inheritance
TerminalColorDetector
Inherited Members

Constructors

TerminalColorDetector(IDriver?)

Creates a new instance of the TerminalColorDetector class.

Methods

Detect(Action<Color?, Color?>)

Sends OSC 10 and OSC 11 queries to detect the terminal's default foreground and background colors. Results are delivered asynchronously via the resultCallback.