Link to the solution in a related question: you can adjust the shift_hue() function to adjust the hue, saturation and value, not just the hue. This should allow you to migrate all of these options as you like.
Original:
def shift_hue(arr, hout): r, g, b, a = np.rollaxis(arr, axis=-1) h, s, v = rgb_to_hsv(r, g, b) h = hout r, g, b = hsv_to_rgb(h, s, v) arr = np.dstack((r, g, b, a)) return arr
Adjusted Version:
def shift_hsv(arr, delta_h, delta_, delta_v): r, g, b, a = np.rollaxis(arr, axis=-1) h, s, v = rgb_to_hsv(r, g, b) h += delta_h s += delta_s v += delta_v r, g, b = hsv_to_rgb(h, s, v) arr = np.dstack((r, g, b, a)) return arr
Assuming you know the base color of the source image and the target color you need, you can easily calculate the delta:
base_h, base_s, base_v = rgb_to_hsv(base_r, base_g, base_b) target_h, target_s, target_v = rgb_to_hsv(target_r, target_g, target_b) delta_h, delta_s, delta_v = target_h - base_h, target_s - base_s, target_v - base_v