Please consider the following example. It is to color coordinate table cell contents.
| Name | Age | Color |
|------+-----+-------|
| John | 25 | red |
| Mary | 30 | green |
| Tom | 40 | blue |
#+TBLFM: $3='(progn (cond ((string= $3 "red") "[:foreground \"red\"]")
((string= $3 "green") "[:foreground \"green\"]")
((string= $3 "blue") "[:foreground \"blue\"]")
(t "")))::
It does not seem to work. How can I get it to work?
What's the simplest way to colorize text in an org-mode table cell depending on say a threshold value in the cell? Alternative solutions welcome. It can't be this difficult.
Something along these lines does not seem to work either:
| Column 1 | Column 2 |
|----------+----------|
| foo | 42 |
| bar | 69 |
| baz | 1337 |
|----------+----------|
#+TBLFM: $2='(format "[%s]" (propertize $2 'font-lock-face '(:foreground "red")))
The format of the cell content changes but not the color. WTH??!!
Rather than spending an inordinate amount of time on this seemingly trivial problem, I got the above examples from ChatGPT. None of which work. Hmm.. I now have a collection of such examples all from various queries of ChatGPT to try and none of them work.