1

I was trying to set colour for my table for building a node-cli-terminal using blessed

function createListTable(alignment, padding, isInteractive = false) {
  return {
    parent: screen,
    keys: true,
    align: alignment,
    selectedFg: "white",
    selectedBg: "blue",
    interactive: isInteractive, // Makes the list table scrollable
    padding: padding,
    width: '80%',
    height: '30%',
    style: {
         fg: 'cyan',
         border: {
         fg: 'cyan'
       },
       cell: {
         selected: {
           fg: "black",
           bg: "light-yellow"
         }
      },
      header: {
        fg: "gray",
        bold: true
      }
    },
  };
}

When i am making new instance of my table i am unable to set the color for cell.

data[1][0] = '{red-fg}' + data1[1][0] + '{/red-fg}';
piash
  • 153
  • 1
  • 5

1 Answers1

1

The solution is simple just add in createListTable

tag: true 
Tanjin Alam
  • 1,728
  • 13
  • 15