Table of Contents

Class ColorBlendHelper

Namespace
SharpConsoleUI.Helpers
Assembly
SharpConsoleUI.dll

Shared color blending utilities used by flash overlay, fade animations, and other effects. Extracted to avoid code duplication between WindowStateService and WindowAnimations.

public static class ColorBlendHelper
Inheritance
ColorBlendHelper
Inherited Members

Methods

ApplyColorOverlay(CharacterBuffer, Color, float, float)

Applies a color overlay to the entire buffer, blending each cell's foreground and background toward the overlay color at the given intensity. Used by flash effects, fade animations, and similar overlay-based transitions.

public static void ApplyColorOverlay(CharacterBuffer buffer, Color overlayColor, float intensity, float foregroundBlendRatio = 0.5)

Parameters

buffer CharacterBuffer

The character buffer to modify.

overlayColor Color

The color to blend toward.

intensity float

The background blend intensity (0.0 to 1.0).

foregroundBlendRatio float

Ratio applied to intensity for foreground blending. Defaults to AnimationDefaults.FlashForegroundBlendRatio.

BlendColor(Color, Color, float)

Blends two colors together by the specified amount.

public static Color BlendColor(Color original, Color target, float amount)

Parameters

original Color

The original color.

target Color

The target color to blend toward.

amount float

The blend amount (0.0 = original, 1.0 = target).

Returns

Color