# IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

### DXColorNameToRGB

Function

Gets the RGB values for a specified color-name string.

Syntax
`
#include <dx/dx.h>
`

Error DXColorNameToRGB(char *colorname, RGBColor *rgbvalue)

Functional Details

The RGB values of the color string `colorname` are obtained from a color lookup table and returned in `*rgbvalue`. For example, the RGB values for the color "white" are 1.0, 1.0, 1.0. The color lookup table could come from a number of places:

- The routine first checks the environment variable DXCOLORS. If that is set, the routine uses the value of the variable and tries to open it as a file.

- If that does not succeed, the routine then checks the environment variables DXEXECROOT and DXROOT for a directory path. It will append `/lib/colors.txt` to this path and try to open the file. If that fails, it tries to open `/usr/lpp/dx/lib/colors.txt`.

- If none of these files can be opened, the routine uses an internal static table. This table is a subset of colors in the file `/usr/lpp/dx/lib/colors.txt`.

Return Value

Returns `OK` or returns `ERROR` and sets an error code.

See Also

"Colors".

[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]

[IBM Home Page | Order | Search | Contact IBM | Legal ]