Class: Tuile::TerminalBackground::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/tuile/terminal_background.rb,
sig/tuile.rbs

Overview

What a detection found: the light/dark scheme, and the background color when a terminal actually reported one.

color is nil whenever the scheme came from the COLORFGBG fallback, so a consumer deriving a tint from the background must handle nil — plenty of terminals answer neither query.

Instance Attribute Summary collapse

Instance Attribute Details

#colorColor? (readonly)

@return — the reported background as 24-bit RGB, or nil when only COLORFGBG answered.

Returns:



45
# File 'lib/tuile/terminal_background.rb', line 45

Result = Data.define(:scheme, :color)

#schemeSymbol (readonly)

@return:light or :dark.

Returns:

  • (Symbol)


45
# File 'lib/tuile/terminal_background.rb', line 45

Result = Data.define(:scheme, :color)