---
name: "selinux_colors_path"
section: "3"
platform: "linux"
package: "libselinux1-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/selinux_colors_path"
---

# selinux\_colors\_path(3)

Return a path to the active SELinux policy color configuration file

## NAME

selinux\_colors\_path - Return a path to the active SELinux policy color configuration file

## SYNOPSIS

**#include \<selinux/selinux.h\>**

**const char \*selinux\_colors\_path(void);**

## DESCRIPTION

**selinux\_colors\_path**() returns the path to the active policy color configuration file.

The path is built from the path returned by  [**selinux\_policy\_root**(3)](/selinux_policy_root/3.md) with  */secolor.conf* appended.

This optional configuration file whose format is shown in  [**secolor.conf**(5)](/secolor.conf/5.md), controls the colors to be associated with the  *raw* context components of the [**selinux\_raw\_context\_to\_color**(3)](/selinux_raw_context_to_color/3.md) function when information is to be displayed by an SELinux color-aware application.

## RETURN VALUE

On success, the path to the active policy color configuration file is returned. If a path is not available NULL is returned.

## ERRORS

None.

## SEE ALSO

[**selinux**(8)](/selinux/8.md), [**selinux\_policy\_root**(3)](/selinux_policy_root/3.md), [**selinux\_config**(5)](/selinux_config/5.md), [**selinux\_raw\_context\_to\_color**(3)](/selinux_raw_context_to_color/3.md), [**secolor.conf**(5)](/secolor.conf/5.md)
