title: how to set custom background-color in angular2-tree
body: <p>I am new in angular 4 and trying to implement angular2-tree. But I am unable to find the way to set background-color of each node dynamically.
  I am trying to pass "color" in out list of data. 
  Please suggest me.
  Below is the my code :</p>
  
  <pre><code> @Component({
    selector: 'app-checkboxes',
    template: ` 
      &lt;h3&gt;tri-state checkboxes&lt;/h3&gt;
      &lt;tree-root
        #tree
        [nodes]="nodes"
        [options]="options"&gt;
  
        &lt;ng-template #treeNodeTemplate let-node="node" let-index="index"  &gt;
        &lt;div [contextMenu]="myContextMenu" [contextMenuSubject]="node" &gt;
       {{ node.data.name }}&amp;nbsp; &amp;nbsp; 
        &lt;input 
            type="checkbox"
            [indeterminate]="node.data.indeterminate"
            [checked]="node.data.checked"&gt; 
            &lt;/div&gt;
        &lt;/ng-template&gt; 
      &lt;/tree-root&gt;  
    `,
    styles: [
    ] 
  })
  // nodes that are used to bind the tree -- Class 
    nodes = [
      {
        name: 'root1',
        checked: true,
        color:this.getNextColor(1),
        actions:[{
          enabled: true,
          execute: (node: any): void =&gt; console.log(node),
          html: (node: any): string =&gt; `John custom: ${node.name}`,
          visible: true,
        }, {
          divider: true,
          visible: true,
        }, {
          enabled: true,
          execute: (item: any): void =&gt; console.log(item),
          html: (item: any): string =&gt; `John custom: ${item.name}`,
          visible: true,
        }]
      },
      {
        name: 'root2',
        checked: true,
        color:this.getNextColor(2),
        children: [
          { name: 'child1', checked: true },
          { name: 'child2', checked: true, children: [
            { name: 'grandchild1', checked: true },
            { name: 'grandchild2', checked: true }
          ] }
        ]
      }
    ];
  </code></pre>