adding/mixing colors in HSV Space

*爱你&永不变心* 提交于 2019-12-05 05:27:04

Honestly, I'd convert the RGB, average the components and convert back to HSV.

It's not the most efficient way, but you'll presumably have or need RGB<->HSV code and the RGB calculation is likely to be much simpler.

One of the standard references Computer Graphics: Principles and Practice by Foley et al. has this to say in section 13.3.7 "Interpolating in Color Space":

"When two images are blended [...] the colors may be quite distant, and an additive model, such as RGB, is appropriate. If, on the other hand, the objective is to interpolate between two colors of fixed hue (or saturation) and to maintain the fixed hue (or saturation) for all interpolated colors, then HSV or HLS is preferable. But note that fixed-saturation interpolation in HSV or HSL is not seen as having fixed saturation by the viewer [...]"

So they agree with the suggestion of @andrewmu, which seems like the best suggestion in general.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!