Skip to content

Commit

Permalink
fix: tracks color (#730)
Browse files Browse the repository at this point in the history
* fix: tracks color

* chore: black format
  • Loading branch information
orionna319 authored Oct 27, 2024
1 parent b8e8fe1 commit d1244e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions run_page/gpxtrackposter/tracks_drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,10 @@ def color(
diff = length_range.diameter()
if diff == 0:
return color1
if (
self.poster.length_range.upper() / 1000
< self.poster.special_distance["special_distance2"]
):
return color1

return interpolate_color(color1, color2, (length - length_range.lower()) / diff)

0 comments on commit d1244e4

Please sign in to comment.