UNPKG

codenames

Version:

Converts numerical values into human-readable names following a specific theme (e.g., cities)

24 lines 1.57 kB
/** * Auto-generated from colors.txt. Do not edit manually. * Run 'bun run scripts/generate.ts colors Color' to regenerate. * * SPDX-FileCopyrightText: 2025-present Kriasoft * SPDX-License-Identifier: MIT */ export declare const colors: readonly ["red", "blue", "green", "yellow", "black", "white", "gray", "pink", "orange", "purple", "brown", "gold", "silver", "tan", "navy", "beige", "lime", "cyan", "coral", "violet", "maroon", "olive", "teal", "rose", "amber", "ruby", "jade", "bronze", "copper", "pearl", "cream", "sky", "forest", "ocean", "sunset", "peach", "mint", "sage", "wine", "rust", "sand", "snow", "cherry", "grape", "lemon", "plum", "aqua", "crimson", "emerald", "ivory"]; export type Color = (typeof colors)[number]; /** * Converts a number to a Color codename * * @param input - The number to convert * @returns A Color name * * @example * ```typescript * import codename from "codenames/colors-50"; * codename(1234) // "maroon" * ``` */ export declare const codename: (input: number) => "red" | "blue" | "green" | "yellow" | "black" | "white" | "gray" | "pink" | "orange" | "purple" | "brown" | "gold" | "silver" | "tan" | "navy" | "beige" | "lime" | "cyan" | "coral" | "violet" | "maroon" | "olive" | "teal" | "rose" | "amber" | "ruby" | "jade" | "bronze" | "copper" | "pearl" | "cream" | "sky" | "forest" | "ocean" | "sunset" | "peach" | "mint" | "sage" | "wine" | "rust" | "sand" | "snow" | "cherry" | "grape" | "lemon" | "plum" | "aqua" | "crimson" | "emerald" | "ivory"; export default codename; //# sourceMappingURL=colors-50.d.ts.map