Animations
All color animations are under Animations.Color:
1Animations.Color = {2 HUE, // Hue rotation animation3 RGB, // RGB cycling animation4 HEX, // HEX cycling animation5 All // Unified animation with 'hue', 'rgb', 'hex' modes6};
Examples
1import { Animations } from 'hbh-terminal';3// Hue animation4Animations.Color.HUE('Hello World 🌈', { step: 10 });6// RGB cycling7Animations.Color.RGB('RGB Cycling!', { step: 20 });9// HEX cycling10Animations.Color.HEX('HEX Mode 💖', { step: 15 });12// Unified animation13Animations.Color.All('Unified Mode ⚡', { mode: 'rgb', step: 12 });
Configuration Options
| Option | Description |
|---|---|
callback |
Function to render each frame (default: HBHConsole update) |
step |
Increment of color change (default: 5) |
sVal |
Starting color value (default: 0) |
mode |
'hue', 'rgb', 'hex' (for All) |