halb3 / halb3/colors

Allow color initialization from string with color space prefix

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.