确定颜色饱和度时出现问题
我正在编写一个工具,它将尝试确定哪种已知颜色与某些颜色“最接近”用户选择的颜色(来自整个 RGB 色域)。我注意到 Microsoft 的 GetHue 和 GetBrightness 返回的值似乎与 HSL 和 HSV 文章。但 Microsoft 的 GetSaturation 似乎并不始终等于任何计算值(HSL、HSV、HSI)。
问题
- Microsoft 的 GetHue、GetSaturation 和 GetBrightness 函数使用什么颜色模型?
- 有人在 HSL 和 HSV 计算中发现错误吗?
I am writing a tool that will attempt to determine which of the known colors is "closest" to some user-chosen color (from the full RGB gamut). I am noticing that the values returned by Microsoft's GetHue and GetBrightness appear to have the same values as the HSL Hue and the HSL Lightness values computed by the HSL and HSV article. But Microsoft's GetSaturation does not appear to consistently equate to any computed value (HSL, HSV, HSI).
Question(s)
- What color model does Microsoft use for its GetHue, GetSaturation, and GetBrightness functions?
- Has anyone found errors in the HSL and HSV computations?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 RGB 到 HSL 和返回,计算问题 并发现我的算法推导有缺陷。
Microsoft 在其 GetHue、GetSaturation 和 GetBrightness 函数中使用什么颜色模型? HSL。在“颜色对话框”组件中,HSL 值从范围 [0,1] 转换为范围 [0,240]。
HSL 和 HSV 中似乎没有任何错误,只有那些我认为正确的错误
I reviewed Chris Haas' algorithm in RGB to HSL and back, calculation problems and found that my derivation of the algorithm was flawed.
What color model does Microsoft use for its GetHue, GetSaturation, and GetBrightness functions? HSL. In the Color Dialog component, the HSL values are transformed from the range [0,1] to the range [0,240].
There do not appear to be any errors in HSL and HSV, only those that I introdiced.