Skip to content

Commit

Permalink
fix getLogProbabilityColor
Browse files Browse the repository at this point in the history
  • Loading branch information
djstrong committed Dec 30, 2024
1 parent 354b1ab commit 785b674
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions apps/namerank.io/app/indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ export const Indicator = ({ value }: IndicatorProps) => {
return [0, green, 0];
};

const getLabel = (val: number): string => {
const [r, g, b] = getLogProbabilityColor(val);
return (
<div className="w-32 h-5 border border-gray-300 p-1 rounded overflow-hidden">
<div className={`h-full rounded-sm`} style={{backgroundColor: `rgb(${r}, ${g}, ${b})`}} />
</div>
);

const [r, g, b] = getLogProbabilityColor(val);

return (
<div className="w-32 h-5 border border-gray-300 p-1 rounded overflow-hidden">
<div className={`h-full rounded-sm`} style={{backgroundColor: `rgb(${r}, ${g}, ${b})`}} />
</div>
);
};

0 comments on commit 785b674

Please sign in to comment.