RGB Color For Color Temperature

Color For K Temp

Unlike the Color For F Temp and Color For C Temp verbs this takes a color temperature in K. You’ve seen these numbers on warm white and cool white bulbs a number generally ranging from around 2700k for a very warm tungsten filament lamp color to 3200k for a Halogen bulb up to 6000k for “daylight” or cool white bulbs.

This verb takes the color temperature and returns an approximate standard HTML color string for a representative color. Since the screen and device that you are displaying the color on is unlikely to be a properly calibrated device the representation won’t be completely accurate, but will give the general idea of the color temperature you’re trying to represent.

The output can be used anywhere in XTension that an RGB color is accepted for example setting the background of a unit icon display or setting the color of a color capable lighting device.

Usage:

set myColorString to color for K temp 2700

The return is a standard HTML color string of 6 characters in the “RRGGBB” format.

History:

  • Added to XTension in version 9.3.2
dictionary/color/colorforktemp.txt · Last modified: 2017/07/09 08:56 by James Sentman
CC Attribution-No Derivative Works 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0