title: MATLAB set background color in a cell of uicontrol
body: <p>I want to set a background color in a cell..</p>
  
  <p><strong>something like:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/WLMbB.png" alt="enter image description here"></p>
  
  <p>so I have the RGB color and the number of cell I want to color.</p>
  
  <p>you can assume that the position of the cell is what I wrote.</p>
  
  <p>my color is given by RGB:</p>
  
  <pre><code>color = [255 0 0];
  </code></pre>
  
  <p>I want to add it in the 10th cell, so I wrote something like:</p>
  
  <pre><code>S.cell_data(10) = uicontrol('style','text',...
                 'units','pix',...
                 'Position',[20 70 80 40],...
                 'string',color);
  </code></pre>
  
  <p>but the style is not 'text' and it is no a string.</p>
  
  <p>this is what I'm trying right now:</p>
  
  <pre><code>S.cell_data(10) = uicontrol('style','text',...
                 'units','pix',...
                 'Position',[125 70 80 40],...
                 'string','fh');
  
  parentColor = get(get(S.cell_data(10), 'parent'), 'color');
  
  set(S.cell_data(num_of_cols+1),'foregroundcolor', [0 0 0], ...
    'backgroundcolor', parentColor);
  </code></pre>
  
  <p>somebody knows?</p>