Class DesktopEffects
- Namespace
- SharpConsoleUI.Rendering
- Assembly
- SharpConsoleUI.dll
Built-in animated effect presets for desktop backgrounds. Each method returns a DesktopBackgroundConfig with a PaintCallback that produces the named animation effect.
public static class DesktopEffects
- Inheritance
-
DesktopEffects
- Inherited Members
Methods
ColorCycling(double, GradientDirection, int)
Smoothly cycles through hues over time using HSL color space. Three hue-shifted colors are computed from elapsed time and used to build a ColorGradient that fills the desktop.
public static DesktopBackgroundConfig ColorCycling(double cycleDurationSeconds = 12, GradientDirection direction = GradientDirection.Vertical, int intervalMs = 100)
Parameters
cycleDurationSecondsdoubleHow long a full hue cycle takes in seconds. Default: 12.
directionGradientDirectionGradient direction. Default: Vertical.
intervalMsintAnimation repaint interval in milliseconds. Default: 100.
Returns
- DesktopBackgroundConfig
A DesktopBackgroundConfig configured for the color-cycling effect.
DriftingGradient(Color, Color, double, int)
A two-color gradient that cycles through all four GradientDirection values over time. The gradient color order is alternated between direction steps for smooth visual transitions.
public static DesktopBackgroundConfig DriftingGradient(Color color1, Color color2, double cycleDurationSeconds = 8, int intervalMs = 150)
Parameters
color1ColorFirst gradient color.
color2ColorSecond gradient color.
cycleDurationSecondsdoubleHow long a full direction cycle takes in seconds. Default: 8.
intervalMsintAnimation repaint interval in milliseconds. Default: 150.
Returns
- DesktopBackgroundConfig
A DesktopBackgroundConfig configured for the drifting gradient effect.
Pulse(Color, double, double, int)
Subtle pulsing brightness on a base color using a sine wave. The brightness oscillates around the base color's perceived luminance.
public static DesktopBackgroundConfig Pulse(Color baseColor, double pulseRange = 0.15, double pulseDurationSeconds = 4, int intervalMs = 100)
Parameters
baseColorColorThe base color to pulse.
pulseRangedoubleHow far the brightness varies above and below the base. Default: 0.15.
pulseDurationSecondsdoubleDuration of one full pulse cycle in seconds. Default: 4.
intervalMsintAnimation repaint interval in milliseconds. Default: 100.
Returns
- DesktopBackgroundConfig
A DesktopBackgroundConfig configured for the pulse effect.