smooth-viz-theme-new
v1.0.4
Published
Lightweight visualization theme utilities with CSS custom properties and chart color palettes
Downloads
1,059
Maintainers
Readme
smooth-viz-theme
Lightweight visualization theme utilities with CSS custom properties and chart color palettes.
Usage
import { palettes, applyTheme, createGradient } from 'smooth-viz-theme';
// Apply ocean palette to a container
applyTheme(document.getElementById('chart'), 'ocean');
// Get a CSS gradient
const bg = createGradient('sunset', '45deg');Palettes
ocean— cool bluessunset— warm gradientforest— natural greensmidnight— muted purples
API
palettes— color arrays by namespacing— consistent spacing tokensapplyTheme(element, paletteName)— apply CSS vars to elementcreateGradient(paletteName, direction)— generate CSS gradient string
