Is +HSV still a thing?

From the ccokbook:

Depending on the design of your CPT, you may want to have it either way. By default, GMT interpolates in RGB space, even when the original CPT is in the HSV system. However, when you add the line #COLOR_MODEL=+HSV (with the leading ‘+’ sign) in the header of the CPT, GMT will not only read the color representation as HSV values, but also interpolate colors in the HSV system. That means that H, S, and V values are interpolated linearly between two colors, instead of their respective R, G, and B values.

but it seems that rainbow.cpt is using HSV interpolation but reads

# Standard rainbow colortable for hue = 300 (magenta) to 0 (red)
#
#----------------------------------------------------------
# COLOR_MODEL = hsv
#----------------------------------------------------------
0       magenta 1       red
#----------------------------------------------------------

Is that outdated documentation (and +HSV is no more) or am I misunderstanding? If the former, how/when is HSV interpolation enabled?

Hi @jjg. I think you are right, the capital HSV with leading plus seems obsolete. I just looked at the parsing code and it does this:

if (strstr (line, "+RGB") || strstr (line, "rgb"))
	X->model = GMT_RGB | GMT_COLORINT;
else if (strstr (line, "RGB"))
	X->model = GMT_RGB;
else if (strstr (line, "+HSV") || strstr (line, "hsv"))
	X->model = GMT_HSV | GMT_COLORINT;
else if (strstr (line, "HSV"))
	X->model = GMT_HSV;
else if (strstr (line, "+CMYK") || strstr (line, "cmyk"))
	X->model = GMT_CMYK | GMT_COLORINT;
else if (strstr (line, "CMYK"))
	X->model = GMT_CMYK;
else
	GMT_Report (GMT->parent, GMT_MSG_ERROR, "Unrecognized COLOR_MODEL in color palette table %s\n", cpt_file);

So we switched to lower-case rgb|hsv|cmyk some years ago but we still honor the old plus-prefaced capital selections.

I will update the documentation accordingly. Thanks for pointing it out.

Thanks – so hsv has replaced +HSV, but the latter is still supported (and both mean HSV-interpolation)?

Yes, they mean the same and we keep checking for +HSV for backwards compatibility.

Great – thanks!

No worries, the docs will update soon - I have submitted a PR.