unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Heime <heimeborgia@protonmail.com>
To: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Making coloured table from array values
Date: Fri, 04 Nov 2022 10:09:56 +0000	[thread overview]
Message-ID: <wT2lVC4dINTa3RD1-xu9g1bY46e9ZPPzT-JKHlS7zT-MIkZ-fGPu91Yptwber937LzYpcWObWFas9wyGXVIkIVQQ1PV6pKXQG5NXGk6H-AI=@protonmail.com> (raw)


I would like to make a table that is coloured.

For instance, I have the following five element array [3 2 1 0 0] and would like
a table with four columns (first one for a title) with the rest of the columns 
coloured according to the array values (3 means colour the last three table columns,
0 means no colouring).

[3 2 1 0 0] giving
 
Title 1 | Green | Green | Green |   (3-columns coloured)
Title 2 | Amber | Amber |       |   (2-columns coloured)
Title 3 | Amber |       |       |   (1-column coloured) 
Title 4 |       |       |       |   (0-columns coloured)
Title 5 |       |       |       |   (0-columns coloured)








                 reply	other threads:[~2022-11-04 10:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='wT2lVC4dINTa3RD1-xu9g1bY46e9ZPPzT-JKHlS7zT-MIkZ-fGPu91Yptwber937LzYpcWObWFas9wyGXVIkIVQQ1PV6pKXQG5NXGk6H-AI=@protonmail.com' \
    --to=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).