Xbasic

UI_COLOR_FORMAT Function

Syntax

Color_Definition as C = UI_COLOR_FORMAT(C color_name,C color_format)

Arguments

color_name

The name of an Alpha Anywhere color.

color_format

Specifies the format or the returned data with the following syntax: R [ H | O | D ][ , ] G [ H | O | D ][ , ] B [ H | O | D ] For example, "RGB" returns the red, green and blue value as Decimal values with no punctuation separating the values. "R,G,B" returns the decimal values with commas separating the values. The H (Hex), O (Octal) or D (Decimal) optional qualifiers specify the number format.

Description

The UI_COLOR_FORMAT() function returns the RGB color values of an Alpha Anywhere color name. Format a named color (color format R=red G=Green B=Blue or N-(numeric value or all) follow each with H=Hex O=Octal D=Decimal).

Example

Return the color value of "canvas: in decimal with comma separators.

? ui_color_format("canvas","r,g,b") ? "230,216,141"
 Return the color value of "canvas: in hex with no separators.
 ? ui_color_format("canvas","rhghbh") ? "e6d88d"

See Also