export type OxyColor = string; /** * The undefined color. */ export declare const OxyColor_Undefined: OxyColor; /** * The automatic color. */ export declare const OxyColor_Automatic: OxyColor; export declare class OxyColorEx { /** * The alpha component.0-255 */ readonly a: number; /** * The blue component.Rendering */ readonly b: number; /** * The green component.Rendering */ readonly g: number; /** * The red component.Rendering */ readonly r: number; readonly hex: OxyColor; constructor(a: number, r: number, g: number, b: number); static fromArgb(a: number, r: number, g: number, b: number): OxyColorEx; static fromHex(hex: string): OxyColorEx; static fromOxyColor(c: OxyColorEx | OxyColor): OxyColorEx; static fromRgb(r: number, g: number, b: number): OxyColorEx; static fromHsv(hue: number, sat: number, val: number): OxyColorEx; static fromAColor(a: number, color: OxyColorEx | OxyColor): OxyColorEx; } export declare class OxyColorHelper { static isOxyColor(obj: any): obj is OxyColor; static getOxyColor(c: OxyColor | OxyColorEx): OxyColor; /** * Parse a string. * @param value The string in the format "#FFFFFF00" or "255,200,180,50". * @returns The parsed color. * @throws Error if the format is invalid. */ static parse(value: string): OxyColor; static parseHex(value: string): { a: number; r: number; g: number; b: number; }; /** * Calculates the difference between two OxyColors. * @param c1 The first color. * @param c2 The second color. * @returns L2-norm in ARGB space. */ static colorDifference(c1: OxyColorEx, c2: OxyColorEx): number; /** * Convert an unsigned integer to an OxyColor. * @param color The unsigned integer color value. * @returns The OxyColor. */ static fromUInt32(color: number): OxyColor; private static uint32ToArgb; /** * Converts from HSV to `OxyColor`. * @param hue The hue value [0,1] * @param sat The saturation value [0,1] * @param val The intensity value [0,1] * @returns The `OxyColor`. * @remarks See [Wikipedia](http://en.wikipedia.org/wiki/HSL_Color_space). */ static fromHsv(hue: number, sat: number, val: number): OxyColor; /** * Creates a color defined by an alpha value and another color. * @param a Alpha value. * @param color The original color. * @returns A color. */ static fromAColor(a: number, color: OxyColorEx | OxyColor): OxyColor; /** * Creates a color from the specified ARGB values. * @param a The alpha value. * @param r The red value. * @param g The green value. * @param b The blue value. * @returns A color. */ static fromArgb(a: number, r: number, g: number, b: number): OxyColor; /** * Creates a new `OxyColor` structure from the specified RGB values. * @param r The red value. * @param g The green value. * @param b The blue value. * @returns An `OxyColor` structure with the specified values and an alpha channel value of 1. */ static fromRgb(r: number, g: number, b: number): OxyColor; /** * Interpolates the specified colors. * @param color1 The color1. * @param color2 The color2. * @param t The t. * @returns The interpolated color */ static interpolate(color1: OxyColorEx | OxyColor, color2: OxyColorEx | OxyColor, t: number): OxyColorEx; /** * Determines whether the specified OxyColor is equal to the current instance. * @returns true if the specified OxyColor is equal to the current instance; otherwise, false. */ static equals(c: OxyColorEx | OxyColor, other: OxyColorEx | OxyColor): boolean; static toArgb(c: OxyColorEx | OxyColor): string; static toRgba(c: OxyColorEx | OxyColor): string; static toRgb(c: OxyColorEx | OxyColor): string; static toHexString(r: number, g: number, b: number, a?: number): string; private static toArgbInner; /** * Determines whether the current color is invisible. * @returns True if the alpha value is 0. */ static isInvisible(color: OxyColorEx | OxyColor): boolean; /** * Determines whether the current color is visible. * @returns True if the alpha value is greater than 0. */ static isVisible(color: OxyColorEx | OxyColor): boolean; /** * Determines whether the current color is undefined. * @returns True if the color equals OxyColors.Undefined. */ static isUndefined(color: OxyColorEx | OxyColor): boolean; /** * Determines whether the current color is automatic. * @returns True if the color equals OxyColors.Automatic. */ static isAutomatic(color: OxyColorEx | OxyColor): boolean; /** * Gets the actual color. * @returns The default color if the current color equals OxyColors.Automatic, otherwise the color itself. */ static getActualColor(c: OxyColor | OxyColorEx, defaultColor: OxyColor | OxyColorEx): OxyColor; /** * Changes the intensity. * @param color The color. * @param factor The factor. * @returns A color with the new intensity. */ static changeIntensity(color: OxyColor | OxyColorEx, factor: number): OxyColorEx; /** * Changes the saturation. * @param color The color. * @param factor The factor. * @returns A color with the new saturation. */ static changeSaturation(color: OxyColor | OxyColorEx, factor: number): OxyColorEx; /** * Changes the opacity. * @param color The color. * @param factor The factor. * @returns A color with the new opacity. */ static changeOpacity(color: OxyColor | OxyColorEx, factor: number): OxyColorEx; /** * Calculates the complementary color. * @param color The color to convert. * @returns The complementary color. */ static complementary(color: OxyColor | OxyColorEx): OxyColorEx; /** * Converts from a `OxyColor` to HSV values (double) * @param color The color. * @returns Array of [Hue,Saturation,Value] in the range [0,1] */ static toHsv(color: OxyColor | OxyColorEx): number[]; /** * Converts to an unsigned integer. * @param color The color. * @returns The color as an unsigned integer. */ static toUint(color: OxyColor | OxyColorEx): number; /** * Converts an OxyColor to a string containing the ARGB byte values. * @param color The color. * @returns A string that contains byte values of the alpha, red, green and blue components separated by comma. */ static toByteString(color: OxyColor | OxyColorEx): string; /** * Calculate the difference in hue between two `OxyColor`s. * @param c1 The first color. * @param c2 The second color. * @returns The hue difference. */ static hueDifference(c1: OxyColor, c2: OxyColor): number; } /** * Implements a set of predefined colors. */ export declare const OxyColors: { /** The undefined color. */ readonly Undefined: string; /** The automatic color. */ readonly Automatic: string; /** The alice blue. */ readonly AliceBlue: "#f0f8ff"; /** The antique white. */ readonly AntiqueWhite: "#faebd7"; /** The aqua. */ readonly Aqua: "#0ff"; /** The aquamarine. */ readonly Aquamarine: "#7fffd4"; /** The azure. */ readonly Azure: "#f0ffff"; /** The beige. */ readonly Beige: "#f5f5dc"; /** The bisque. */ readonly Bisque: "#ffe4c4"; /** The black. */ readonly Black: "#000"; /** The blanched almond. */ readonly BlanchedAlmond: "#ffebcd"; /** The blue. */ readonly Blue: "#00f"; /** The blue violet. */ readonly BlueViolet: "#8a2be2"; /** The brown. */ readonly Brown: "#a52a2a"; /** The burly wood. */ readonly BurlyWood: "#deb887"; /** The cadet blue. */ readonly CadetBlue: "#5f9ea0"; /** The chartreuse. */ readonly Chartreuse: "#7fff00"; /** The chocolate. */ readonly Chocolate: "#d2691e"; /** The coral. */ readonly Coral: "#ff7f50"; /** The cornflower blue. */ readonly CornflowerBlue: "#6495ed"; /** The cornsilk. */ readonly Cornsilk: "#fff8dc"; /** The crimson. */ readonly Crimson: "#dc143c"; /** The cyan. */ readonly Cyan: "#0ff"; /** The dark blue. */ readonly DarkBlue: "#00008b"; /** The dark cyan. */ readonly DarkCyan: "#008b8b"; /** The dark goldenrod. */ readonly DarkGoldenrod: "#b8860b"; /** The dark gray. */ readonly DarkGray: "#a9a9a9"; /** The dark green. */ readonly DarkGreen: "#006400"; /** The dark khaki. */ readonly DarkKhaki: "#bdb76b"; /** The dark magenta. */ readonly DarkMagenta: "#8b008b"; /** The dark olive green. */ readonly DarkOliveGreen: "#556b2f"; /** The dark orange. */ readonly DarkOrange: "#ff8c00"; /** The dark orchid. */ readonly DarkOrchid: "#9932cc"; /** The dark red. */ readonly DarkRed: "#8b0000"; /** The dark salmon. */ readonly DarkSalmon: "#e9967a"; /** The dark sea green. */ readonly DarkSeaGreen: "#8fbc8f"; /** The dark slate blue. */ readonly DarkSlateBlue: "#483d8b"; /** The dark slate gray. */ readonly DarkSlateGray: "#2f4f4f"; /** The dark turquoise. */ readonly DarkTurquoise: "#00ced1"; /** The dark violet. */ readonly DarkViolet: "#9400d3"; /** The deep pink. */ readonly DeepPink: "#ff1493"; /** The deep sky blue. */ readonly DeepSkyBlue: "#00bfff"; /** The dim gray. */ readonly DimGray: "#696969"; /** The dodger blue. */ readonly DodgerBlue: "#1e90ff"; /** The firebrick. */ readonly Firebrick: "#b22222"; /** The floral white. */ readonly FloralWhite: "#fffaf0"; /** The forest green. */ readonly ForestGreen: "#228b22"; /** The fuchsia. */ readonly Fuchsia: "#f0f"; /** The gainsboro. */ readonly Gainsboro: "#dcdcdc"; /** The ghost white. */ readonly GhostWhite: "#f8f8ff"; /** The gold. */ readonly Gold: "#ffd700"; /** The goldenrod. */ readonly Goldenrod: "#daa520"; /** The gray. */ readonly Gray: "#808080"; /** The green. */ readonly Green: "#008000"; /** The green yellow. */ readonly GreenYellow: "#adff2f"; /** The honeydew. */ readonly Honeydew: "#f0fff0"; /** The hot pink. */ readonly HotPink: "#ff69b4"; /** The indian red. */ readonly IndianRed: "#cd5c5c"; /** The indigo. */ readonly Indigo: "#4b0082"; /** The ivory. */ readonly Ivory: "#fffff0"; /** The khaki. */ readonly Khaki: "#f0e68c"; /** The lavender. */ readonly Lavender: "#e6e6fa"; /** The lavender blush. */ readonly LavenderBlush: "#fff0f5"; /** The lawn green. */ readonly LawnGreen: "#7cfc00"; /** The lemon chiffon. */ readonly LemonChiffon: "#fffacd"; /** The light blue. */ readonly LightBlue: "#add8e6"; /** The light coral. */ readonly LightCoral: "#f08080"; /** The light cyan. */ readonly LightCyan: "#e0ffff"; /** The light goldenrod yellow. */ readonly LightGoldenrodYellow: "#fafad2"; /** The light gray. */ readonly LightGray: "#d3d3d3"; /** The light green. */ readonly LightGreen: "#90ee90"; /** The light pink. */ readonly LightPink: "#ffb6c1"; /** The light salmon. */ readonly LightSalmon: "#ffa07a"; /** The light sea green. */ readonly LightSeaGreen: "#20b2aa"; /** The light sky blue. */ readonly LightSkyBlue: "#87cefa"; /** The light slate gray. */ readonly LightSlateGray: "#789"; /** The light steel blue. */ readonly LightSteelBlue: "#b0c4de"; /** The light yellow. */ readonly LightYellow: "#ffffe0"; /** The lime. */ readonly Lime: "#0f0"; /** The lime green. */ readonly LimeGreen: "#32cd32"; /** The linen. */ readonly Linen: "#faf0e6"; /** The magenta. */ readonly Magenta: "#f0f"; /** The maroon. */ readonly Maroon: "#800000"; /** The medium aquamarine. */ readonly MediumAquamarine: "#66cdaa"; /** The medium blue. */ readonly MediumBlue: "#0000cd"; /** The medium orchid. */ readonly MediumOrchid: "#ba55d3"; /** The medium purple. */ readonly MediumPurple: "#9370db"; /** The medium sea green. */ readonly MediumSeaGreen: "#3cb371"; /** The medium slate blue. */ readonly MediumSlateBlue: "#7b68ee"; /** The medium spring green. */ readonly MediumSpringGreen: "#00fa9a"; /** The medium turquoise. */ readonly MediumTurquoise: "#48d1cc"; /** The medium violet red. */ readonly MediumVioletRed: "#c71585"; /** The midnight blue. */ readonly MidnightBlue: "#191970"; /** The mint cream. */ readonly MintCream: "#f5fffa"; /** The misty rose. */ readonly MistyRose: "#ffe4e1"; /** The moccasin. */ readonly Moccasin: "#ffe4b5"; /** The navajo white. */ readonly NavajoWhite: "#ffdead"; /** The navy. */ readonly Navy: "#000080"; /** The old lace. */ readonly OldLace: "#fdf5e6"; /** The olive. */ readonly Olive: "#808000"; /** The olive drab. */ readonly OliveDrab: "#6b8e23"; /** The orange. */ readonly Orange: "#ffa500"; /** The orange red. */ readonly OrangeRed: "#ff4500"; /** The orchid. */ readonly Orchid: "#da70d6"; /** The pale goldenrod. */ readonly PaleGoldenrod: "#eee8aa"; /** The pale green. */ readonly PaleGreen: "#98fb98"; /** The pale turquoise. */ readonly PaleTurquoise: "#afeeee"; /** The pale violet red. */ readonly PaleVioletRed: "#db7093"; /** The papaya whip. */ readonly PapayaWhip: "#ffefd5"; /** The peach puff. */ readonly PeachPuff: "#ffdab9"; /** The peru. */ readonly Peru: "#cd853f"; /** The pink. */ readonly Pink: "#ffc0cb"; /** The plum. */ readonly Plum: "#dda0dd"; /** The powder blue. */ readonly PowderBlue: "#b0e0e6"; /** The purple. */ readonly Purple: "#800080"; /** The red. */ readonly Red: "#f00"; /** The rosy brown. */ readonly RosyBrown: "#bc8f8f"; /** The royal blue. */ readonly RoyalBlue: "#4169e1"; /** The saddle brown. */ readonly SaddleBrown: "#8b4513"; /** The salmon. */ readonly Salmon: "#fa8072"; /** The sandy brown. */ readonly SandyBrown: "#f4a460"; /** The sea green. */ readonly SeaGreen: "#2e8b57"; /** The seashell. */ readonly SeaShell: "#fff5ee"; /** The sienna. */ readonly Sienna: "#a0522d"; /** The silver. */ readonly Silver: "#c0c0c0"; /** The sky blue. */ readonly SkyBlue: "#87ceeb"; /** The slate blue. */ readonly SlateBlue: "#6a5acd"; /** The slate gray. */ readonly SlateGray: "#708090"; /** The snow. */ readonly Snow: "#fffafa"; /** The spring green. */ readonly SpringGreen: "#00ff7f"; /** The steel blue. */ readonly SteelBlue: "#4682b4"; /** The tan. */ readonly Tan: "#d2b48c"; /** The teal. */ readonly Teal: "#008080"; /** The thistle. */ readonly Thistle: "#d8bfd8"; /** The tomato. */ readonly Tomato: "#ff6347"; /** The transparent. */ readonly Transparent: "#00ffffff"; /** The turquoise. */ readonly Turquoise: "#40e0d0"; /** The violet. */ readonly Violet: "#ee82ee"; /** The wheat. */ readonly Wheat: "#f5deb3"; /** The white. */ readonly White: string; /** The white smoke. */ readonly WhiteSmoke: "#f5f5f5"; /** The yellow. */ readonly Yellow: "#ff0"; /** The yellow green. */ readonly YellowGreen: "#9acd32"; }; export declare function getOxyColorByName(colorName: string): OxyColor | undefined; //# sourceMappingURL=OxyColor.d.ts.map