---
name: "dtk_get_color"
section: "3"
platform: "linux"
package: "libdrawtk-dev"
version: "2.0-2.1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/dtk_get_color"
---

# dtk\_get\_color(3)

provides predefined set of colors

## NAME

dtk\_get\_color - provides predefined set of colors

## SYNOPSIS

**#include \<dtk\_colors.h\>**

**const float\* dtk\_get\_color(unsigned int** *ind***);**\

## DESCRIPTION

**dtk\_get\_color**() returns the *ind*-th color in a predefined palette of colors. The returned value in a pointer to a array of 4 float representing an RGBA color.

For more convenient usage, prefer the following macros that call **dtk\_get\_color**() with the correct argument:

**dtk\_white**\
 **dtk\_black**\
 **dtk\_yellow**\
 **dtk\_orange**\
 **dtk\_blue**\
 **dtk\_green**\
 **dtk\_red**\
 **dtk\_magenta**\
 **dtk\_cyan**\
 **dtk\_butter\_light**\
 **dtk\_butter\_med**\
 **dtk\_butter\_dark**\
 **dtk\_orange\_light**\
 **dtk\_orange\_med**\
 **dtk\_orange\_dark**\
 **dtk\_chocolate\_light**\
 **dtk\_chocolate\_med**\
 **dtk\_chocolate\_dark**\
 **dtk\_chameleon\_light**\
 **dtk\_chameleon\_med**\
 **dtk\_chameleon\_dark**\
 **dtk\_skyblue\_light**\
 **dtk\_skyblue\_med**\
 **dtk\_skyblue\_dark**\
 **dtk\_plum\_light**\
 **dtk\_plum\_med**\
 **dtk\_plum\_dark**\
 **dtk\_scarletred\_light**\
 **dtk\_scarletred\_med**\
 **dtk\_scarletred\_dark**\
 **dtk\_aluminium\_light**\
 **dtk\_aluminium\_med**\
 **dtk\_aluminium\_dark**\
 **dtk\_aluminium2\_light**\
 **dtk\_aluminium2\_med**\
 **dtk\_aluminium2\_dark**\

## RETURN VALUE

The pointer to the RGBA value of the color if *ndP refers to correct* *value, NULL otherwise.*
