Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the precision of alpha values #55

Merged
merged 1 commit into from May 28, 2021

Conversation

omgovich
Copy link
Owner

@omgovich omgovich commented May 28, 2021

During the work on cssnano/cssnano#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.

@omgovich omgovich self-assigned this May 28, 2021
@github-actions
Copy link

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
Copy link

codecov-commenter commented May 28, 2021

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.

@omgovich omgovich merged commit 502451e into master May 28, 2021
@omgovich omgovich deleted the improvement/alpha-precision branch May 28, 2021 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants