title: How to set cell background color in grid/table in view in Vaadin?
body: <p>I am using Vaadin and I would like to set backgroung color to specific cell in my grid/table or if there is no possible to set background color to specific cell I would like to at least set a font color to specific cell in grid/table. The code TableView where I have got a grid/table is below:</p>
  
  <pre><code>package com.trading.scraper;
  
  import com.vaadin.navigator.View;
  import com.vaadin.ui.CustomComponent;
  import com.vaadin.ui.Grid;
  import com.vaadin.ui.VerticalLayout;
  
  import java.util.Arrays;
  import java.util.List;
  
  class TableView extends CustomComponent implements View {
  
      static final String NAME = "Stock table";
  
      TableView() {
          final VerticalLayout layout = new VerticalLayout();
  
          List&lt;Stock&gt; people = Arrays.asList(
                  new Stock("1", "2", "1"),
                  new Stock("3", "5", "2"),
                  new Stock("1", "3", "4"));
  
          Grid&lt;Stock&gt; grid = new Grid&lt;&gt;();
          grid.setWidth(100, Unit.PERCENTAGE);
          grid.setItems(people);
          grid.addColumn(Stock::getValue1).setCaption("Value1");
          grid.addColumn(Stock::getValue2).setCaption("Value2");
          grid.addColumn(Stock::getValue3).setCaption("Value3");
  
          layout.addComponents(grid);
          setCompositionRoot(layout);
      }
  }
  </code></pre>
  
  <p>The content class for grid/table is:</p>
  
  <pre><code>package com.trading.scraper;
  
  public class Stock {
  
      private String value1;
      private String value2;
      private String value3;
  
      public String getValue1() {
          return value1;
      }
  
      public void setValue1(String value1) {
          this.value1 = value1;
      }
  
      public String getValue2() {
          return value2;
      }
  
      public void setValue2(String value2) {
          this.value2 = value2;
      }
  
      public String getValue3() {
          return value3;
      }
  
      public void setValue3(String value3) {
          this.value3 = value3;
      }
  
      public Stock() {
      }
  
      Stock(String value1, String value2, String value3) {
          this.value1 = value1;
          this.value2 = value2;
          this.value3 = value3;
      }
  }
  </code></pre>
  
  <p>If it is possible to set background color to specific cell or at least set font color and you know how to do it please write. E.g. where cell's value in grid/table is "1" I would like to make it red but if e.g. cell's value is "5" I would like to make it green and if cell's value is "3" I would like to make it yellow. Thank you very much.</p>