STATUS

A function for constructing color values for use in displaying query results,. STATUS can be called in three different ways. With one argument, STATUS can be used to specify a color as one of a set of pre-defined color values (error, info, warning, tip, success, default). Called with three arguments, STATUS interpolates between two colors, based on the value of it's first argument. In this case, the first argument should be a decimal value between 0 and 1, and the second and third arguments should be status colors. Finally, STATUS can be called with five arguments. In that case the first three arguments should be decimal numbers defining a low value, a high value, and a value between them to interpolate. The fourth and fifth arguments should be the status colors to be interpolated

ParameterType
arg1
boolean, integer, string, double, decimal, color
arg2
boolean, integer, string, double, decimal, color
arg3
boolean, integer, string, double, decimal, color
arg4
boolean, integer, string, double, decimal, color
arg5
boolean, integer, string, double, decimal, color
Returns: color

Example

query:

SELECT WITH_COLOR("dave", STATUS("info")) as name

results:

name
dave
query:
```SQL
SELECT WITH_COLOR(“dave”, STATUS(0.5, “info”, “default”)) as name
```
results:
name
dave
query:
```SQL
SELECT WITH_COLOR(“dave”, STATUS(3, 1, 4, “info”, “default”)) as name
```
results:
name
dave