Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eldh/pick-a-color
A modern color picker
https://github.com/eldh/pick-a-color
Last synced: 27 days ago
JSON representation
A modern color picker
- Host: GitHub
- URL: https://github.com/eldh/pick-a-color
- Owner: eldh
- Created: 2021-10-17T20:12:55.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-20T07:19:59.000Z (about 3 years ago)
- Last Synced: 2024-08-03T16:08:46.506Z (4 months ago)
- Language: ReScript
- Size: 677 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rescript - Pick a color - A modern color picker based on the LCH color model. Utilizes React concurrent mode. [(demo)](https://eldh.github.io/pick-a-color) (ReScript / Example Apps)
README
# Pick-a-color
A modern color picker.
Modern computers can display more colors than we can specify with the old `#rrggbb` notation. Also, rgb is not great in a lot of ways. For example it's hard to pick two different hues that have the same "lightness" using RGB.
LCH is a better (my personal opinion) color model, which is more uniform and allows you to express more colors. This is what is used in `pick-a-color`. Unfortunately browsers don't fully support lch colors yet, so we have to convert them to rgb color space. Luckily, we can use `p3`, which is a wider rgb color space.
React concurrent mode is used to make stuff smooth and most of the code is written in ReScript. It's all very alpha.