ui-color icon indicating copy to clipboard operation
ui-color copied to clipboard

Increased precision

Open alphapeter opened this issue 3 years ago • 0 comments

Hi! First off, thanks for your excellent work of providing this tool. It was one of the first hits when searching using google. The UI looks nice too.

I found that using just two digits for the decimal part will loose precision during conversion. RGB is 256 levels (0-255) and two digit precision will only allow 100 levels (00-99), loosing about half of the precision. Picky QA will notice this when using color picker tool.

I don't know if you still maintain this page or not, but a simple solution would be either to just increase precision to 3 digits or allow for changing the precision in the UI. I tested the latter approach, providing an additional input field for setting the precision. I made a simple deploy using github pages at https://ui-color.klaesson.net if you want to try it out. I defaulted to 4 digits (but can be set to whatever, 3 will probably be sufficient). I could probably create a PR too if you want.

alphapeter avatar Mar 03 '21 16:03 alphapeter