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
bufferCharacterBufferThe character buffer to modify.
overlayColorColorThe color to blend toward.
intensityfloatThe background blend intensity (0.0 to 1.0).
foregroundBlendRatiofloatRatio 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
originalColorThe original color.
targetColorThe target color to blend toward.
amountfloatThe blend amount (0.0 = original, 1.0 = target).