Mejora el siguiente README. [code] sh nimble install…
- User
Mejora el siguiente README.
<!-- toc omit heading --> # Documentación Implementacion de HexToAnsi para nim. - [Instalación](#instalacin) - [Uso](#uso) - [Procs](#procs) - [`hexToAnsi`](#hextoansi) - [`fg` y `bg`](#fg-y-bg) - [`cfg` y `cbg`](#cfg-y-cbg) - [Otras expresiones utiles](#otras-expresiones-utiles) ## Instalación Para instalar esta utilidad, utiliza el siguiente comando: ```sh nimble install "https://github.com/farias-hecdin/HexToAnsi"Uso
A continuación se muestra un ejemplo de cómo utilizar
HexToAnsi:import pkg/hex2ansi let fgRed = fg("#ff0000") # Output: "\e[38;5;196m" let bgRed = bg("#ff0000") # Output: "\e[48;5;196m"Procs
hexToAnsiConvierte un color hexadecimal a un código de color ANSI.
Parámetros:
hex: Código de color hexadecimal (por ejemplo,#FF0000)mode: Modo de conversión (0para foreground y1para background).
proc hexToAnsi(hex: string, mode: int): stringfgybgObtener el color 'Foreground' o 'background' en tiempo de ejecución.
Parámetros:
hex: Código de color hexadecimal (por ejemplo,#FF0000)
# Foreground proc fg(hex: string): string # Background proc bg(hex: string): stringcfgycbgObtener el color 'foreground' o 'background' en tiempo de compilación.
Parámetros:
hex: Código de color hexadecimal (por ejemplo,#FF0000)
# Foreground proc cfg(hex: static string): string # Background proc cbg(hex: static string): stringOtras expresiones utiles
### Other useful additional expressions proc bold(): string proc underline(): string proc emphasis(): string proc unstyle(): string - Assistant