Table of Contents

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

cycleDurationSeconds double

How long a full hue cycle takes in seconds. Default: 12.

direction GradientDirection

Gradient direction. Default: Vertical.

intervalMs int

Animation 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

color1 Color

First gradient color.

color2 Color

Second gradient color.

cycleDurationSeconds double

How long a full direction cycle takes in seconds. Default: 8.

intervalMs int

Animation 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

baseColor Color

The base color to pulse.

pulseRange double

How far the brightness varies above and below the base. Default: 0.15.

pulseDurationSeconds double

Duration of one full pulse cycle in seconds. Default: 4.

intervalMs int

Animation repaint interval in milliseconds. Default: 100.

Returns

DesktopBackgroundConfig

A DesktopBackgroundConfig configured for the pulse effect.