-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,31 @@ | ||
/** | ||
* A collection of functions to extract information from colors, | ||
* generate shades and tints, convert to other color spaces, etc. | ||
* | ||
* **Note: All methods either accept RGB/RGBA colors as parameters or give RGB/RGBA colors as results. In order to work with other color spaces (eg. XYZ), convert them to RGB first.** | ||
* | ||
* @example | ||
* ```ts | ||
* // Deno /x | ||
* import { rgbaFromHex, xyz, lab } from "https://deno.land/x/colors/mod.ts"; | ||
* | ||
* // Deno JSR | ||
* import { rgbaFromHex, xyz, lab } from "jsr:@retraigo/colors"; | ||
* | ||
* // Node JSR (after installation) | ||
* import { rgbaFromHex, xyz, lab } from "jsr:@retraigo/colors"; | ||
* | ||
* const color = rgbaFromHex("#fceff1"); | ||
* | ||
* // CIE XYZ color space | ||
* console.log(xyz(color)); | ||
* | ||
* // CIE LAB color space | ||
* console.log(lab(color)); | ||
* | ||
* // Conversion of color into all supported spaces | ||
* console.log(json(color)); | ||
* ``` | ||
* @module | ||
*/ | ||
export * from "./src/mod.ts"; |