生成光谱调色板 [英] Generating spectrum color palettes

查看:238
本文介绍了生成光谱调色板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一种简单的方法在Java(RGB,HSV和Lab)中的颜色模型之间进行转换。

Is there an easy way to convert between color models in Java (RGB, HSV and Lab).

假设RGB颜色模型:


  • 如何计算黑体光谱颜色调色板?

> 修改:我发现 ColorSpace 类可用于RGB / CIE和许多其他颜色模型之间的转换。

I found that the ColorSpace class can be used for conversions between RGB/CIE and many other color models.

推荐答案

也许我不理解你的问题,但你不能真正从RGB输出设备生成一个真正的黑体光谱。有限的色域将是一个问题,如果没有别的。

Maybe I'm not understanding your question, but you can't really generate a true black-body spectrum from an RGB output device. Limited color gamut would be an issue, if nothing else. If all you want is something that visually resembles a black-body spectrum, that's probably a lot easier.

作为近似值,从(R,G,B)斜线0,0,0)到(255,0,0),然后到(255,255,0),然后到(255,255,255)。

As an approximation, ramp from (R,G,B) (0,0,0) to (255,0,0), then to (255,255,0), then to (255,255,255). That'd give you the dull-red to orange, to yellow, to white transition.

如果你想要更科学的,维基百科的文章黑体辐射有一些颜色与温度的关系图。一旦你找出了CIE坐标,你可以将它们转换为RGB在你最喜欢的颜色空间。

If you want something more scientific, the Wikipedia article on black body radiation has some plots of color vs temperature. Once you figure out the CIE coordinates, you can translate those to RGB in your favorite color space.

编辑:找到一些其他在线参考:
太阳的颜色是什么?
黑色是什么颜色?

found some other online references: What color is the Sun? What color is a blackbody?

这篇关于生成光谱调色板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆