nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ COLOR_BRIGHTNESS_TO_PCT

#define COLOR_BRIGHTNESS_TO_PCT ( _val)

#include <include/caf/led_effect.h>

Value:
((_val * 100) / UINT8_MAX)

Transform color brightness from 8-bit space to percentage representation.

Parameters
_valColor brightness in 0-255 range
Returns
Color brightness in 0-100 range