UNPKG

@drgd/aura

Version:

Extract color palettes from any image. Works on both server and client.

20 lines (17 loc) 647 B
import { AuraColor, AuraResponse } from './index.js'; /** * React hook for extracting colors from an image URL. * * @param imageUrl - URL of the image * @param options - Configuration options * @param options.paletteSize - Number of colors to extract (1-12) * @param options.fallbackColors - Custom fallback colors * @param options.onError - Error callback function * @returns Object containing colors, loading state, and error state */ declare function useAura(imageUrl?: string | null, options?: { paletteSize?: number; fallbackColors?: AuraColor[]; onError?: (error: Error) => void; }): AuraResponse; export { useAura };