Skip to content

Commit

Permalink
fix(scripts: darker): convert hex to int before math
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Jan 25, 2023
1 parent eb83bc1 commit 6e58503
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/darker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -ueo pipefail
darker_channel() {
value="$1"
light_delta="$2"
result="$(bc <<< "ibase=16; $value - $light_delta")"
value_int="$(bc <<< "ibase=16; $value")"
result="$(bc <<< "$value_int - $light_delta")"
if [[ "$result" -lt 0 ]]; then
result=0
fi
Expand Down

0 comments on commit 6e58503

Please sign in to comment.