Format cells inside table

Jakob Damgaard Møller <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <CAMmJSsH7au5svttf-pC-4F7Ka3wQsqXNhjTZG-jFhqhJjvOHVw@mail.gmail.com>
Hello, this is my first post to this list, so i hope i do it right.

I try to create a table in reportlab.

data = [
  ['Firstname', 'Lastname', 'Points'],
  ['Jakob', 'Møller', '5'],
  ['Anna', 'Møller', '10'],
etc...
]

I want to format cell in colors based on result.
F.ex:
if points > 5:
  cell_color = "green"
elif point < 5:
  cell_color = "red"
else:
  cell_color = "yellow"

I have looked at this:
http://www.blog.pythonlibrary.org/2010/09/21/reportlab-tables-creating-tables-in-pdfs-with-python/
But as i understand it, the color is defined on coordinates. Cant i assign
a color when i create "data" ?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.