harmony
harmony copied to clipboard
Reduce size by rounding floats
Now we are using 6 digits for L after the comma: 0.917969.
Isn’t it too much? I think we can round it to 2-3 digits, and we will not be able to see the difference.
I wonder if there's a way to determine how much this would affect the perceived color space programatically?
I too don't think one would see the difference between 0.917969 and 0.9180 but I don't see why we need to round it up either, especially when the palette is often loaded from either a node package or cdn.
For what it's worth, however, some references:
- Tailwind latest palette for their V4, which uses
oklch, sets to 3 decimal places - stylelint-config-standard enforces 4 decimal places using the number-max-precision rule