coloured-success

1.0.3 • Public • Published

coloured-success

An ultra lightweight Vanilla JS library that converts a success percentage in the relevant color

Example of Coloured Success

Installation

$ npm i coloured-success

Uses

let success = 40; // 0-100

getRgbColorAsSucess(success); //rgb(255,130.05,0)

getRgbaColorAsSucess(success, 0.2); //rgba(255,130.05,0,0.2)

Use with Typescript

import { getRgbColorAsSucess, getRgbaColorAsSucess } from "coloured-success";

Use with Angular

<h1 [ngStyle]="{ color: getRgbColorAsSucess(40) }"></h1>

Examples of use

  • Metrics Metrics

  • Grades Grades

Package Sidebar

Install

npm i coloured-success

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

2.67 MB

Total Files

9

Last publish

Collaborators

  • javier-arocena