Skip to content

Commit

Permalink
Fix linear acceleration gradient color (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Jan 14, 2025
1 parent b8b6dce commit f22b4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/config/robotconfig/PathGradient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class PathGradientFunctions {

// Divide by 10 to scale linear acceleration to [0, 1], invert range, then
// scale to red-green hue [0, 100]
return `hsl(${100 * (1 - acceleration / 10)}, 100%, 50%)`;
return `hsl(${(100 * acceleration) / 10}, 100%, 50%)`;
}

/**
Expand Down

0 comments on commit f22b4b6

Please sign in to comment.