COLOR function

COLOR(TextualColor) COLOR(TextualColor)

TextualColor

Text or { Text }

A textual version of the color to return.

Returns

Color or { Color }

A color corresponding to the given textual color.

Returns a color based on the given parameter.

Here are a few examples of supported parameter values:

Refer to our appearance guide for much more information on colors. This function is Calcapp-specific.

Details

A number of different textual color formats are supported by the parameter, which is case-insensitive:

Examples

COLOR("RED")COLOR("RED")

Returns a color corresponding to a deeply saturated red color.

Color.RedColor,Red

Returns a color corresponding to a deeply saturated red color. Color.RedColor,Red is identical to COLOR("RED")COLOR("RED"), but has the added advantage that typos are flagged immediately instead of only when the app is run. Writing Color., followed by the color name, only works for named colors, though, whereas the COLOR function also works with hex notation (COLOR("#00ff00")COLOR("#00ff00")) and with color models (COLOR("rgb (255, 0, 0)")COLOR("rgb (255, 0, 0)")). Also, the COLOR function is case-insensitive, meaning that COLOR("RED")COLOR("RED") works, but Color.REDColor,RED does not.

COLOR("Red A100")COLOR("Red A100")

Returns a color corresponding to a pale red color.

Color.RedA100Color,RedA100

Returns a color corresponding to a pale red color. Again, Color.RedA100Color,RedA100 is identical to COLOR("red A100")COLOR("red A100").

COLOR("#f44336")COLOR("#f44336")

Returns a color corresponding to a moderately saturated red color, using the same hex notation that is familiar to many web developers.

COLOR("rgb(255, 0, 0)")COLOR("rgb(255, 0, 0)")

Returns a color corresponding to a deeply saturated red color, using notation used by Cascading Style Sheets (CSS), which is familiar to web developers.

{ COLOR("red"), COLOR("blue") }{ COLOR("red"); COLOR("blue") }

Returns an array with the default colors red and blue.

COLOR({ "red", "blue" })COLOR({ "red"; "blue" })

Returns an array with the default colors red and blue. This formula returns the same array as { COLOR("red"), COLOR("blue") }{ COLOR("red"); COLOR("blue") }.

{ Color.Red, Color.Blue }{ Color,Red; Color,Blue }

Returns an array with the default colors red and blue. This formula returns the same array as COLOR({ "red", "blue" })COLOR({ "red"; "blue" }).