omgovich / colord

👑 A tiny yet powerful tool for high-performance color manipulations and conversions
https://colord.omgovich.ru
MIT License
1.63k stars 48 forks source link

feat: implement `relative` option for lighten/darken manipulation #91

Open EricRovell opened 2 years ago

EricRovell commented 2 years ago

90 issue has a valid point: the relative lightness manipulation has a lot of sense.

At first I thought it should be the default behavior, still, as it may be a breaking change, I implemented the feature as an optional relative: Boolean parameter.

codecov-commenter commented 2 years ago

Codecov Report

Merging #91 (2bf9b27) into master (aafcf7c) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #91   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           41        41           
  Lines          622       623    +1     
  Branches       115       142   +27     
=========================================
+ Hits           622       623    +1     
Impacted Files Coverage Δ
src/colord.ts 100.00% <100.00%> (ø)
src/manipulate/lighten.ts 100.00% <100.00%> (ø)

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 aafcf7c...2bf9b27. Read the comment docs.