title: openpyxl - can't add font to cell - is not known style
body: <p>I am testing trying to add a background color to any cells that have the words <code>ultrasound</code> as the value. I am using <code>openpyxl</code></p>
  <p>So far I have:</p>
  <pre><code>from openpyxl import Workbook, load_workbook
  from openpyxl.styles import  PatternFill, colors
  
  my_fill = PatternFill(fill_type=None,
                   start_color='FFFFFFFF',
                  end_color='FF000000')
  wb = load_workbook('TestTemplate.xlsx')
  ws = wb.active
  for row in range(1,ws.max_row):
      for col in range(1,ws.max_column):
          c = ws.cell(row = row, column = col)
          if c.value == &quot;Ultrasound&quot;:
              c.style = my_fill
  wb.save(&quot;testfont.xlsx&quot;)
  </code></pre>
  <p>however it errors at line <code>c.style = my_fill</code> saying:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;execelpytesttim.py&quot;, line 16, in &lt;module&gt;
      c.style = my_fill
    File &quot;/usr/local/lib/python3.8/dist-packages/openpyxl/styles/styleable.py&quot;, line 85, in __set__
      raise ValueError(&quot;{0} is not a known style&quot;.format(value))
  ValueError: &lt;openpyxl.styles.fills.PatternFill object&gt;
  Parameters:
  patternType=None, fgColor=&lt;openpyxl.styles.colors.Color object&gt;
  Parameters:
  rgb='FFFFFFFF', indexed=None, auto=None, theme=None, tint=0.0, type='rgb', bgColor=&lt;openpyxl.styles.colors.Color object&gt;
  Parameters:
  rgb='FF000000', indexed=None, auto=None, theme=None, tint=0.0, type='rgb' is not a known style
  </code></pre>
  <p>I tried different hex values and it still fails. If I try to change the hex values to a color value like <code>blue</code> it will give an error saying that rgb value must be hex.</p>
  <p>Is there something I am missing to get a background color in a cell?</p>