How to use the node-hue-api/hue-api/rgb.convertXYtoRGB function in node-hue-api

To help you get started, we’ve selected a few node-hue-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kvartborg / hueify / src / views / Groups.jsx View on Github external
renderListItem (group) {
    if (group.id === '0') {
      return null
    }

    const rgb = convertXYtoRGB(...group.action.xy, group.action.bri)

    const gradient = {
      background: `linear-gradient(90deg, transparent, rgb(${rgb.join(',')}))`,
      opacity: (group.action.bri / 255)
    }

    return (
      <li>
        <span style="{group.action.on">
        <span>
          <span>
            </span></span></span></li>
github kvartborg / hueify / src / views / Lights.jsx View on Github external
renderListItem (light) {
    const rgb = convertXYtoRGB(...light.state.xy, light.state.bri)

    const gradient = {
      background: `linear-gradient(90deg, transparent, rgb(${rgb.join(',')}))`,
      opacity: (light.state.bri / 255)
    }

    return (
      <li>
        <span style="{light.state.on">
        <span>
          <span>
            </span></span></span></li>