{"version":3,"file":"get-heat-color.cjs","names":[],"sources":["../../../src/Heatmap/get-heat-color/get-heat-color.ts"],"sourcesContent":["interface GetHeatColorInput {\n  value: number;\n  min: number;\n  max: number;\n  colors: string[];\n}\n\nexport function getHeatColor({ value, min, max, colors }: GetHeatColorInput) {\n  const percent = max === min ? 1 : (value - min) / (max - min);\n  const colorIndex = Math.round((colors.length - 1) * percent);\n  return colors[colorIndex];\n}\n"],"mappings":";;AAOA,SAAgB,aAAa,EAAE,OAAO,KAAK,KAAK,UAA6B;CAC3E,MAAM,UAAU,QAAQ,MAAM,KAAK,QAAQ,QAAQ,MAAM;AAEzD,QAAO,OADY,KAAK,OAAO,OAAO,SAAS,KAAK,QAAQ"}