bar

Renders a single bar in an ANSI bar chart using a default low_color of red and a high_color of green. For example, if x of 25% and width of 40 are passed to this function. A 10-character red bar will be drawn followed by 30 spaces to create a bar of 40 characters.

Supported Signatures

function bar(double, bigint) returns varchar
function bar(double, bigint, color, color) returns varchar

πŸ”— Official Documentation

color

Returns a color capturing a decoded RGB value from a 4-character string of the format β€œ#000”. The input string should be varchar containing a CSS-style short rgb string or one of black, red, green, yellow, blue, magenta, cyan, white.

Supported Signatures

function color(double, color, color) returns color
function color(double, double, double, color, color) returns color
function color(varchar) returns color

πŸ”— Official Documentation

render

Renders value x using the specific color using ANSI color codes. x can be either a double, bigint, or varchar.

Supported Signatures

function render(boolean) returns varchar
function render(bigint, color) returns varchar
function render(double, color) returns varchar
function render(varchar, color) returns varchar

πŸ”— Official Documentation

rgb

Returns a color value capturing the RGB value of three component color values supplied as int parameters ranging from 0 to 255. red, green, blue.

Supported Signatures

function rgb(bigint, bigint, bigint) returns color

πŸ”— Official Documentation