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.
set myColorString to color for K temp 2700
The return is a standard HTML color string of 6 characters in the “RRGGBB” format.