Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erikyo/color-esm
https://github.com/erikyo/color-esm
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/erikyo/color-esm
- Owner: erikyo
- Created: 2024-04-19T12:17:25.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-05-19T14:23:29.000Z (8 months ago)
- Last Synced: 2024-10-10T00:43:03.859Z (3 months ago)
- Language: TypeScript
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Chainable color module using modern js
// Example usage:
const color1 = Color.fromString('rgbString(255, 255, 255)');
const color2 = Color.fromObject({ r: 255, g: 255, b: 255 });
const color3 = Color.rgbString(255, 255, 255);
const color4 = Color.rgbArray([255, 255, 255]);console.log(color1); // Outputs: Color { color: { r: 255, g: 255, b: 255, a: 1 } }
console.log(color2); // Outputs: Color { color: { r: 255, g: 255, b: 255, a: 1 } }
console.log(color3); // Outputs: Color { color: { r: 255, g: 255, b: 255, a: 1 } }
console.log(color4); // Outputs: Color { color: { r: 255, g: 255, b: 255, a: 1 } }