cs-rcg

1.1.0 • Public • Published

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%)

Package Sidebar

Install

npm i cs-rcg

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

2.52 kB

Total Files

3

Last publish

Collaborators

  • ianfabs