import { MAX_COLOR_HUE, MAX_COLOR_SATURATION, MAX_COLOR_VALUE } from './consts.js';
import { clamp } from './clamp.js';

function correctHSV(color) {
  return {
    h: clamp(color.h, MAX_COLOR_HUE),
    s: clamp(color.s, MAX_COLOR_SATURATION),
    v: clamp(color.v, MAX_COLOR_VALUE)
  };
}

export { correctHSV };
