Comprehensive list of recognized color names

Is there a comprehensive list of color name strings that the LIFX API recognizes? This page has a list of example colors, but are there additional names that are recognized?

The LIFX Channel on IFTTT includes colors such as “cold white”, “pastel red”, and “random”. Are these color name strings unique to LIFX’s integration with IFTTT, or are those colors name strings recognized by the LIFX API as well?

Thanks!

The list on the page you linked is actually comprehensive. Here is a snippet from the actual code responsible:

NAMED_COLORS = {
  "white"  => [nil, 0, nil, nil],
  "red"    => [0, 1, nil, nil],
  "orange" => [36, 1, nil, nil],
  "yellow" => [60, 1, nil, nil],
  "cyan"   => [180, 1, nil, nil],
  "green"  => [120, 1, nil, nil],
  "blue"   => [250, 1, nil, nil],
  "purple" => [280, 1, nil, nil],
  "pink"   => [325, 1, nil, nil]
}

The IFTTT channel has a few extra colors (that are actually all whites) available, a snippet from its code looks like this:

colors = {
  "Cold White" => "kelvin:8000",
  "Cool White" => "kelvin:5000",
  "Medium White" => "kelvin:3500",
  "Warm White" => "kelvin:3000",
  "Hot White" => "kelvin:2700"
}
1 Like

Thanks for the quick reply Daniel! So, would the color name strings listed on the LIFX IFTTT Channel work in the LIFX API? For example, could I use the LIFX API endpoint “Set State” to change the color of a light to “Pastel cyan”?

Oh, I forgot to cover the Pastel colors. They are exactly the same as the normal colors with the saturation set to 0.5.

No you cant. The colors that we implemented in the HTTP API were only for demo purposes, we expect applications will manage much more varied and comprehensive color lists than we ever could.

Using the information I’ve given you so far though, you should be able to infer that Pastel Cyan actually means:

hue:180 saturation:0.5

Makes sense. Thanks!