namespace CCL::Colors

Overview

Color definitions and utilities. More…

namespace Colors {

// global variables

Color kTransparentBlack;
ColorF kTransparentBlackF;
Color kBlack;
Color kWhite;
Color kRed;
Color kGreen;
Color kBlue;
Color kYellow;
Color kGray;
Color kLtGray;

// global functions

void toCString (
    ColorRef color,
    char* cString,
    int cStringSize,
    bool withAlpha = true
);

bool fromCString (Color& color, CStringPtr cString);
void toString (ColorRef color, String& string, bool withAlpha = true);
bool fromString (Color& color, StringRef string);

} // namespace Colors

Detailed Documentation

Color definitions and utilities.

Global Variables

Color kTransparentBlack

black with alpha zero

Color kBlack

black

Color kWhite

white

Color kRed

red

Color kGreen

green

Color kBlue

blue

Color kYellow

yellow

Color kGray

gray

Color kLtGray

lightgray

Global Functions

void toCString (
    ColorRef color,
    char* cString,
    int cStringSize,
    bool withAlpha = true
)

Convert color to C-String.

bool fromCString (Color& color, CStringPtr cString)

Get color from C-String.

void toString (ColorRef color, String& string, bool withAlpha = true)

Convert color to Unicode string.

bool fromString (Color& color, StringRef string)

Get color from Unicode string.