buroventures-harald-code
Version:
Harald Code - AI-powered coding assistant CLI
22 lines (21 loc) • 953 B
TypeScript
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
export declare const CSS_NAME_TO_HEX_MAP: Readonly<Record<string, string>>;
export declare const INK_SUPPORTED_NAMES: Set<string>;
/**
* Checks if a color string is valid (hex, Ink-supported color name, or CSS color name).
* This function uses the same validation logic as the Theme class's _resolveColor method
* to ensure consistency between validation and resolution.
* @param color The color string to validate.
* @returns True if the color is valid.
*/
export declare function isValidColor(color: string): boolean;
/**
* Resolves a CSS color value (name or hex) into an Ink-compatible color string.
* @param colorValue The raw color string (e.g., 'blue', '#ff0000', 'darkkhaki').
* @returns An Ink-compatible color string (hex or name), or undefined if not resolvable.
*/
export declare function resolveColor(colorValue: string): string | undefined;