Allow color initialization from string with color space prefix
Open
enhancement
good first issue
help wanted
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Moved from [webgl-operate](https://github.com/cginternals/webgl-operate/issues/25)
Implement parser for color initialization/creation, e.g.,
* `Color.parse('lab(0.1, 0.1, 0.1)');`
* `Color.parse('rgb(0.1, 0.1, 0.1)');`
* `Color.parse('hsl(0.1, 0.1, 0.1)');`
* `Color.parse('cmyk(0.1, 0.1, 0.1, 0.1)');`
* `Color.parse('rgba(0.1, 0.1, 0.1, 0.1)');`
* etc
This could be also useful (among other things), e.g., data attributes of canvases in haeley-canvas `` ... currently only parsing of a 4-tuple is supported and interpreted as rgba (in `Canvas.constructor`).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.