A somewhat of a documentation of hidden formulas [Added mechanics of nested buttons]

Diferent types of color arguments [Back to index]

Different hidden formulas use different format for specifying colors.
Here is a list of all different color argument types I found so far:

Hex
The most straightforward of them all. Just a hex color in the #rrggbb(aa) format.
This is used in the _Color() formula.

Color palette
This is actually a set of color and it can be any of the following values (case-sensitive):

  • Red
  • Orange
  • Yellow
  • Green
  • Blue
  • Purple
  • Pink
  • Gray

Providing an incorrect color name will permanently crash your doc, even if you haven’t finished typing in the formula. (The doc can be recovered with version history).

That’s why it’s important to add the ending " after the color is fully typed in:

And not type like this:

This format is used in the Button() formula.

Class based
This is basically a single entry from the color palette format above.
In addition to the color name you have to add -light, -medium or -dark.
This format is also case-sensitive, however all letters should be lowercase.

However, this color format is strictly dependent on the function you are using, as it also requires a prefix and a suffix.
This means that if you wanted to use it in the _Color() function, the format would be
_Color("kr-[color name]-[light/medium/dark]-fg","Text")

And here is a full color preview (as of September 2019):
image

P.S.
In a few cases, such as buttons, you can also change the font color independently from the main color by using the _Color function as suggested in this post.

3 Likes