0.0.3 • Published 2 years ago

color-prototypes v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

color-prototypes

String and Number to color prototype library

Installation

  • yarn add color-prototypes or npm 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 {};