resolveNativeStyleColors static method
- required GhosttyTerminalResolvedStyle style,
- required Color defaultForeground,
- required Color defaultBackground,
- Color? metadataColor,
Resolves this style's colors for paint-time use.
When metadataColor is provided and this style has no explicit
background, the metadata color becomes the effective background.
Implementation
static ({Color foreground, Color background}) resolveNativeStyleColors({
required GhosttyTerminalResolvedStyle style,
required Color defaultForeground,
required Color defaultBackground,
Color? metadataColor,
}) {
final resolvedBackground =
metadataColor == null || style.hasExplicitBackground
? style.background
: metadataColor;
return (foreground: style.foreground, background: resolvedBackground);
}