# Cinder

# cinder::CHANTRAIT< uint8_t > Struct Template Reference

`#include <ChanTraits.h>`

List of all members.

## Public Types
typedef uint32_t | Sum
typedef uint32_t | Accum
typedef int32_t | SignedSum
## Static Public Member Functions
static uint8_t | max ()
static uint8_t | convert (uint8_t v)
static uint8_t | convert (uint16_t v)
static uint8_t | convert (float v)
static uint8_t | grayscale (uint8_t r, uint8_t g, uint8_t b)
static uint8_t | premultiply (uint8_t c, uint8_t a)
| Calculates the multiplied version of a color component c by alpha a.

### template<>
struct cinder::CHANTRAIT< uint8_t >

## Member Typedef Documentation

typedef uint32_t cinder::CHANTRAIT< uint8_t >::Sum

typedef uint32_t cinder::CHANTRAIT< uint8_t >::Accum

typedef int32_t cinder::CHANTRAIT< uint8_t >::SignedSum

## Member Function Documentation

static uint8_t cinder::CHANTRAIT< uint8_t >::max | ( |  | ) | `[static]`

static uint8_t cinder::CHANTRAIT< uint8_t >::convert | ( | uint8_t | v | ) | `[static]`

static uint8_t cinder::CHANTRAIT< uint8_t >::convert | ( | uint16_t | v | ) | `[static]`

static uint8_t cinder::CHANTRAIT< uint8_t >::convert | ( | float | v | ) | `[static]`

static uint8_t cinder::CHANTRAIT< uint8_t >::grayscale | ( | uint8_t | r,
|  | uint8_t | g,
|  | uint8_t | b |
| ) |  |  | `[static]`

static uint8_t cinder::CHANTRAIT< uint8_t >::premultiply | ( | uint8_t | c,
|  | uint8_t | a |
| ) |  |  | `[static]`

Calculates the multiplied version of a color component c by alpha a.

The documentation for this struct was generated from the following file:

- include/cinder/ChanTraits.h