1.1.0 • Published 3 years ago

cs-rcg v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Gitpod ready-to-code Node.js Package

RCG

Random Color Generator

A tiny, and fast color generator. Generates hex, hex-alpha, rgb, rgba, hsl, and hsla colors. Optionally able to generate colors in css-spec valid strings.

Usage

Code

import {hex, rgb, hsl} from "https://deno.land/x/rcg/mod.ts";

hex() // 1b69af
hex(true) // #1b69af

rgb() // [12, 102, 67]
rgb() // rgb(12, 102, 67)

hsl() // [217, 48, 91]
hsl() // hsl(217, 48%, 91%)

// You get the idea...

CLI

RCG offers a simple cli for generating colors too.

Installation

$ deno install --allow-read rcg https://deno.land/x/rcg/cli.ts

Usage

$ rcg
3c5f67
$ rcg hsl -f
hsl(161, 28%, 71%)