import { hsv2rgb } from './hsv2rgb.js';
import { rgb2hex } from './rgb2hex.js';
import { _rgbaOrHexString } from './_rgbaOrHexString.js';

function updateH(color, h) {
  var _a = hsv2rgb(h, color.s, color.v), r = _a.r, g = _a.g, b = _a.b;
  var hex = rgb2hex(r, g, b);
  return {
    a: color.a,
    b: b,
    g: g,
    h: h,
    hex: hex,
    r: r,
    s: color.s,
    str: _rgbaOrHexString(r, g, b, color.a, hex),
    v: color.v
  };
}

export { updateH };
