import { D3Selection } from '../types'; /** * Inject alpha channel for color. * @example * mergeAlpha('rgba(0,0,0,0.8)', 0.5) // rgba(0,0,0,0.4) * mergeAlpha('rgba(0,0,0,0)', 1) // rgba(0,0,0,0) * @returns * Return merged color. */ export declare function mergeAlpha(color: T, opacity: number): string | T; /** * Extract opacity from color. * @example * splitAlpha('rgba(0,0,0,0.8)', 0.5) // [0x0, 0.4] * splitAlpha('rgba(0,0,0,0)', 1) // [0x0, 0] * @returns * Color without alpha and merged alpha. */ export declare function splitAlpha(color: string, opacity: number): number[]; /** * Attribute fetching method for drawing methods. * @param index * The group index for one attribute. * @param defaultValue * Return defaultValue when get attribute failed. * @returns * Return attribute value. */ export declare function getAttr(target: MaybeGroup, index: number | undefined, defaultValue: T): T; /** * Batch add styles for d3 selection. * @param style * The object that represent element styles. * @param index * The group index for each attributes. */ export declare function addStyle(target: D3Selection, style: AnyObject, index?: number): D3Selection;