typescript-color-converter
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

color-converter

color-converter, it is used to obtain color value with .ts support;

Typescript Color Converter

npm install  typescript-color-converter --save

Usage

index.ts

import {RGBtoHEX, HEXtoRGB, colors} from 'typescript-color-converter';
 
function convertHexToRgb(hexvalue: string) {
    const convertedRGB = HexToRGB(rgbvalue);
    return convertedRGB;
}
 
function convertRgbToHex(rgbvalue) {
    const convertedHex = RGBtoHEX(rgbvalue);
}
 
colors.red //[255,0,0]

Package Sidebar

Install

npm i typescript-color-converter

Weekly Downloads

1

Version

0.0.3

License

ISC

Unpacked Size

13.7 kB

Total Files

4

Last publish

Collaborators

  • jos33