COLOR

Syntax

COLOR( text, color )

Description

Enables specifying the color for the provided text.

We recommend using the color variables from the Gravity UI palette to specify colors. Such colors are easily discernible with both the light and dark theme.

You can also specify the color in any web format, such as HEX, keyword (e.g., green), RGB, etc. In this case, however, we cannot guarantee that the colors will be discernible.

Argument types:

  • textMarkup | String
  • colorString

Return type: Markup

Examples

COLOR([text], 'var(--g-color-text-danger)')
COLOR([text], '#5282ff')
COLOR([text], 'blue')
COLOR([text], 'rgb(82, 130, 255)')
COLOR([text], 'rgba(82, 130, 255, 0.5)')

Data source support

ClickHouse 21.8, Microsoft SQL Server 2017 (14.0), MySQL 5.7, Oracle Database 12c (12.1), PostgreSQL 9.3, YDB.

Previous
Next