Skip to content

Gradient Flow API

GradientFlow

Extends Effect.

Factory Function

typescript
createGradientFlow(config?: GradientFlowConfig): Effect<GradientFlowConfig>

Methods

See Effect for the full method reference.


GradientFlowConfig

typescript
interface GradientFlowConfig {
    readonly speed?: number;
    readonly scale?: number;
    readonly colors?: string[];
    readonly blobs?: number;
    readonly resolution?: number;
}
PropertyTypeDefaultDescription
speednumber0.5Drift speed of the color blobs.
scalenumber1Scales all sizes proportionally.
colorsstring[]['#ff6b6b', '#4ecdc4', '#45b7d1', '#f9ca24', '#6c5ce7']Colors used for the gradient blobs.
blobsnumber5Number of gradient blobs.
resolutionnumber6Pixel step size for rendering.