color-prototypes
v0.0.3
Published
`String` and `Number` to color prototype library
Downloads
5
Readme
color-prototypes
String
and Number
to color prototype library
Installation
yarn add color-prototypes
ornpm install color-prototypes
Implementation
import module on indexfile of your project or directly on your desired file
import 'color-prototypes'
Usage
console.log(`0.098218011123`.toBlue())
Types
declare global {
export type CliColor = (text: string) => string;
interface CliColors {
black: CliColor;
red: CliColor;
green: CliColor;
yellow: CliColor;
blue: CliColor;
magenta: CliColor;
cyan: CliColor;
white: CliColor;
}
interface String {
toBlack: () => string;
toRed: () => string;
toGreen: () => string;
toYellow: () => string;
toBlue: () => string;
toMagenta: () => string;
toCyan: () => string;
toWhite: () => string;
}
interface Number {
toBlack: () => string;
toRed: () => string;
toGreen: () => string;
toYellow: () => string;
toBlue: () => string;
toMagenta: () => string;
toCyan: () => string;
toWhite: () => string;
}
}
export {};