/**
 * TinyColor Polyfill - A lightweight color manipulation utility.
 *
 * This is a drop-in replacement for tinycolor2, implementing only the methods
 * used in the Vega theme overriding system.
 *
 * @see VD-5026 - [Zero Dependencies] remove tinycolor2 dependency
 */
declare type RgbaValue = {
  r: number;
  g: number;
  b: number;
  a: number;
};
/**
 * TinyColor polyfill class for color manipulation.
 * Implements the same interface as tinycolor2.Instance for the methods used in Vega.
 */
export declare class TinyColorPolyfill {
  private _r;
  private _g;
  private _b;
  private _a;
  /**
   * Create a new TinyColorPolyfill instance.
   *
   * @param {string | RgbaValue} color - The color to parse.
   */
  constructor(color: string | RgbaValue);
  /**
   * Clamp a value between a minimum and maximum.
   *
   * @param {number} value - The value to clamp.
   * @param {number} min - The minimum allowed value.
   * @param {number} max - The maximum allowed value.
   * @returns {number} The clamped value.
   */
  private static clamp;
  /**
   * Parse a color string or RGBA object into an RgbaValue.
   *
   * Supported formats:
   * - Hex: #RGB, #RRGGBB, #RRGGBBAA
   * - RGB: rgb(r, g, b)
   * - RGBA: rgba(r, g, b, a)
   * - Object: { r, g, b, a? }
   *
   * @param {string | RgbaValue} color - The color to parse.
   * @returns {RgbaValue} The parsed RGBA value.
   */
  private static parseColor;
  /**
   * Parse a hex color string into RGBA values.
   *
   * @param {string} hex - The hex color string (e.g., "#fff", "#ffffff", "#ffffffff").
   * @returns {RgbaValue} The parsed RGBA value.
   */
  private static parseHex;
  /**
   * Parse an RGB or RGBA string into RGBA values.
   *
   * @param {string} rgbString - The RGB/RGBA string (e.g., "rgb(255, 128, 0)" or "rgba(255, 128, 0, 0.5)").
   * @returns {RgbaValue} The parsed RGBA value.
   */
  private static parseRgbString;
  /**
   * Convert RGB to HSL.
   *
   * @param {number} r - Red (0-255).
   * @param {number} g - Green (0-255).
   * @param {number} b - Blue (0-255).
   * @returns {HslValue} The HSL values (h: 0-360, s: 0-1, l: 0-1).
   */
  private static rgbToHsl;
  /**
   * Convert HSL to RGB.
   *
   * @param {number} h - Hue (0-360).
   * @param {number} s - Saturation (0-1).
   * @param {number} l - Lightness (0-1).
   * @returns {RgbValue} The RGB values (0-255).
   */
  private static hslToRgb;
  /**
   * Calculate the perceived brightness of a color using the YIQ formula.
   * This matches tinycolor2's brightness calculation.
   *
   * @param {number} r - Red (0-255).
   * @param {number} g - Green (0-255).
   * @param {number} b - Blue (0-255).
   * @returns {number} Brightness value (0-255).
   */
  private static getBrightness;
  /**
   * Check if the color is dark (brightness < 128).
   *
   * @returns {boolean} True if the color is considered dark.
   */
  isDark(): boolean;
  /**
   * Check if the color is light (brightness >= 128).
   *
   * @returns {boolean} True if the color is considered light.
   */
  isLight(): boolean;
  /**
   * Create a copy of this color.
   *
   * @returns {TinyColorPolyfill} A new TinyColorPolyfill instance with the same values.
   */
  clone(): TinyColorPolyfill;
  /**
   * Lighten the color by a given amount.
   * Note: tinycolor2 accepts negative values to darken.
   *
   * @param {number} amount - The amount to lighten (0-100). Negative values darken.
   * @returns {TinyColorPolyfill} This instance for chaining.
   */
  lighten(amount?: number): TinyColorPolyfill;
  /**
   * Darken the color by a given amount.
   *
   * @param {number} amount - The amount to darken (0-100).
   * @returns {TinyColorPolyfill} This instance for chaining.
   */
  darken(amount?: number): TinyColorPolyfill;
  /**
   * Set the alpha (opacity) of the color.
   *
   * @param {number} alpha - The alpha value (0-1).
   * @returns {TinyColorPolyfill} This instance for chaining.
   */
  setAlpha(alpha: number): TinyColorPolyfill;
  /**
   * Get the RGBA representation of the color.
   *
   * @returns {RgbaValue} The RGBA values.
   */
  toRgb(): RgbaValue;
}
/**
 * Factory function to create a TinyColorPolyfill instance.
 * This provides API compatibility with tinycolor2's default export.
 *
 * @param {string | RgbaValue} color - The color to parse.
 * @returns {TinyColorPolyfill} A new TinyColorPolyfill instance.
 */
export declare function tinycolor(color: string | RgbaValue): TinyColorPolyfill;
export {};
