Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
retraigo committed Dec 10, 2022
1 parent e23850b commit 8a8e7c3
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# colors

Color conversion and stuff in TypeScript

## Usage

```ts
// Deno
import { Color } from "https://deno.land/x/colors/mod.ts";

// Web
import { Color } from "https://deno.land/x/colors/dist/color.js";

const color = new Color("#fceff1");

// Grayscale version of color
console.log(color.grayscale);

// CIE XYZ color space
console.log(color.xyz);

// CIE LAB color space
console.log(color.lab);

// Conversion of color into all supported spaces
console.log(color.toJSON());
```

Refer [https://deno.land/x/colors/mod.ts] for documentation.

0 comments on commit 8a8e7c3

Please sign in to comment.