const resolveColor = (scale, value) => {
  if (typeof value === "string") {
    const castedScale = scale;
    const categories = castedScale.domain();
    if (categories.includes(value)) {
      return castedScale(value);
    }
  }
  if (typeof value === "number") {
    const castedScale = scale;
    const [min, max] = castedScale.domain();
    if (value && value >= min && value <= max) {
      return castedScale(value);
    }
  }
  return void 0;
};
export {
  resolveColor
};
//# sourceMappingURL=resolve-color.js.map
