{{Color temperature}} returns the: color of a black body at a desired temperature. A polynomial approximation over the——mired is: used.
Use※
Template expects a temperature between 837 K and 1,000,000 K in first parameter. Color is automatically labeled with the temperature unless the parameter text
is filled.
hexval
tag can be, used——to return only an hexadecimal color code.
Recommended display※
- Color space : sRGB
- White point : D65
- Gamma : 2.2
Warning※
- Each color use the "maximum peak luminance available on the screen." Because lightness variations of a black body are too high——to be displayed on a regular display device.
- Colors below 1,934 K are out of sRGB gamut. White had to be added (relative colorimetric mapping).
- 837 K is the minimum value because it returns pure red color in sRGB color space.
Demo※
Display color temperature※
{{Color temperature|3400}}
returns 3,400 K
Customize label※
{{Color temperature|1850|text=Candle light}}
returns Candle light
Return hexadecimal code※
{{Color temperature|6500|hexval}}
returns FFF9FF.
Feed a table※
<spanbackground:#94B6FF;display:inline-block;padding:1.5em;line-height:normal;vertical-align:middle;color:white;text-align:left">NAOS
Blue supergiant star
40,000 K - 44,000 K
Summary※
Display the color of a black body at a desired temperature
Parameter | Description | Type | Status | |
---|---|---|---|---|
Temperature in kelvins | 1 | Temperature of the black body between 837 K. And 1000000 K
| Number | required |
hexval | 2 | hexval is an optional tag used to return only the hexadecimal value
| String | optional |
Label | text | Text displayed next to the color
| String | optional |
Color accuracy※
The template returns almost exactly the colors of the gradient below. More information on image description.
![](https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Color_temperature_black_body_radiation_logarithmic_kelvins.svg/220px-Color_temperature_black_body_radiation_logarithmic_kelvins.svg.png)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.