omgovich / colord

πŸ‘‘ A tiny yet powerful tool for high-performance color manipulations and conversions
https://colord.omgovich.ru
MIT License
1.67k stars 49 forks source link

Improve the precision of alpha values #55

Closed omgovich closed 3 years ago

omgovich commented 3 years ago

During the work on https://github.com/cssnano/cssnano/pull/1109 we figured out that, for example, rgba(0, 0, 0, 0.55) and rgba(0, 0, 0, 0.555) are perceived differently. So I decided to update the library to output more accurate alpha values by default.

github-actions[bot] commented 3 years ago

Size Change: -3 B (0%)

Total Size: 8.98 kB

Filename Size Change
./dist/index.js 2.01 kB +7 B (0%)
./dist/plugins/hwb.js 890 B -1 B (0%)
./dist/plugins/lab.js 1.03 kB +1 B (0%)
./dist/plugins/lch.js 1.42 kB -10 B (-1%)
ℹ️ View Unchanged | Filename | Size | Change | | :--- | :---: | :---: | | `./dist/plugins/a11y.js` | 459 B | 0 B | | `./dist/plugins/mix.js` | 956 B | 0 B | | `./dist/plugins/names.js` | 1.39 kB | 0 B | | `./dist/plugins/xyz.js` | 833 B | 0 B |

compressed-size-action

codecov-commenter commented 3 years ago

Codecov Report

Merging #55 (775599f) into master (941ccf0) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #55   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           34        35    +1     
  Lines          425       435   +10     
  Branches        94        94           
=========================================
+ Hits           425       435   +10     
Impacted Files Coverage Ξ”
src/colorModels/hex.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/hsl.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/hsv.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/hwb.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/lab.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/lch.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/rgb.ts 100.00% <100.00%> (ΓΈ)
src/colorModels/xyz.ts 100.00% <100.00%> (ΓΈ)
src/colord.ts 100.00% <100.00%> (ΓΈ)
src/constants.ts 100.00% <100.00%> (ΓΈ)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 941ccf0...775599f. Read the comment docs.