import { Palette } from './palette';
import { Color } from './color';
export type GradientSource = (string | Color)[] | Palette;
/**
 * Interpolates between two colors.
 *
 * @param {Color} color1 - Start color.
 * @param {Color} color2 - End color.
 * @param {number} t - Interpolation factor [0, 1].
 * @returns {Color} Interpolated color.
 */
export declare function interpolateColor(color1: Color, color2: Color, t: number): Color;
/**
 * Normalizes a gradient definition into an array of Color objects.
 *
 * @param {GradientSource} raw - A gradient defined as an array of strings, Colors, or a Palette.
 * @returns {Color[]} Array of normalized Color objects.
 */
export declare function normalizeGradient(raw: GradientSource): Color[];
/**
 * Creates a gradient with utilities to sample or split colors.
 */
export declare function Gradient(gradient: GradientSource): {
    readonly colors: Color[];
    /**
     * Samples a color at a specific point in the gradient.
     *
     * @param {number} t - A value in [0, 1] representing the position in the gradient.
     */
    fromInterval(t: number): {
        readonly r: number;
        readonly g: number;
        readonly b: number;
        readonly a: number;
        readonly hex: string;
        readonly rgba: string;
        toString(): string;
        toJSON(): string;
    };
    /**
     * Gets the nth color in a gradient divided into segments.
     *
     * @param {number} n - Index of the color (1-based).
     * @param {number} segments - Total number of segments.
     */
    getNthOf(n: number, segments: number): {
        readonly r: number;
        readonly g: number;
        readonly b: number;
        readonly a: number;
        readonly hex: string;
        readonly rgba: string;
        toString(): string;
        toJSON(): string;
    };
    /**
     * Splits the gradient into n evenly spaced colors.
     */
    split(n: number): {
        readonly r: number;
        readonly g: number;
        readonly b: number;
        readonly a: number;
        readonly hex: string;
        readonly rgba: string;
        toString(): string;
        toJSON(): string;
    }[];
};
