Ever wanted to have some more freedom on row colors? Preset gradients are too few and restricted to numbers only? Here are some tricks to expand coloring capabilities!
Read me first!
This document is designed to demonstrate and test Coda's potential capabilities rather than to serve as a production template.
It primarily utilizes the unofficial _GRADIENT() formula (within the conditional format section). Please note that this formula has certain limitations and could be subject to changes or discontinuation at any time.
You are encouraged to experiment with it, but please be aware that its use is at your own risk.
This doc also uses a convenient pack () that has been built for this precise purpose. Almost everything could have been done in a “pure” Coda, but it would have required a lot of intensive computation. Examples
[Some basic formula knowledge is required, here]
Are you on the dark mode theme? Please, click here: (it might take some time to switch)
1. [Easy] For each row, a manually selectable color
This way you can decide a color for each single row. Useful in Lookup tables.
Here’s an example:
Add a relation column Color to in your table In the Conditional format, add a formula-based rule like this (you can copy/paste it) and apply to the columns of your choice [Optional, but recommended] Still in the Conditional format, add another formula-based rule: Then, just select a white text (More → Custom → Text Color → White) and apply it to the same columns you chose for the background 2. [Medium] Multi-level: for every row, a shade of a specific color
Useful when you have hierarchies. typically category and sub-category.
There are several variations, here is just one of the possible use cases:
To achieve this, just start as in the first example, but define colors only for top-level rows
Then, you add a custom gradient for children that takes the parent’s color as the upper bound and the second Color (default White) as the lower bound.
You can add complexity to multiple nested categories.
3. [Advanced] Tables gradient from a custom palette
If you want fully custom gradients, you “bind” a table to an existing palette here.
To add a palette-based gradient to any table there are some steps to follow Assuming you have a table “My Table”:
Create a new row in the table (see ) Add the link to My Table (via @-mention) Select the palette you prefer (and wait for the color set to be updated) Add a Gradient Info (formula) column in the destination table. Click the ‘ Gradient Info button and paste the content in its formula field Go to conditional formal and add two formula-based rules (here it’s similar to the Easy first step, with slightly different formulas) Click ‘ Background Color button, add a formula-based rule, and paste it into the formula field Similarly, click ‘ Foreground Color button, add a formula-based rule, and paste it in the formula field, then select only a white text for that formula (More → Custom → Text → White)