Color Class Documentation

classColor

Namespace:datalogics_interface

Detailed Description

The values that are offered range from 0 to 1.0 for red, green, and blue (RGB) or cyan, magenta, yellow, and black (CYMK).

Uses types

Constructor & Destructor Documentation

Color

Color(const class Pattern &pattern)

Parameters

pattern: const class Pattern &

the grayscale color value for the new color (0.0 - 1.0)

Create a new color in the DeviceGray colorspace with the specified value.

Color

Color(const ColorSpace &color_space, const std::vector< double > &values)

Parameters

color_space: const ColorSpace &

the grayscale color value for the new color (0.0 - 1.0)

values: const std::vector< double > &

Create a new color in the DeviceGray colorspace with the specified value.

Color

Color(doublec, doublem, doubley, doublek)

Parameters

c: double

the grayscale color value for the new color (0.0 - 1.0)

m: double
y: double
k: double

Create a new color in the DeviceGray colorspace with the specified value.

Color

Color(doublegrey)

Parameters

grey: double

the grayscale color value for the new color (0.0 - 1.0)

Create a new color in the DeviceGray colorspace with the specified value.

Color

Color(doubler, doubleg, doubleb)

Parameters

r: double

the grayscale color value for the new color (0.0 - 1.0)

g: double
b: double

Create a new color in the DeviceGray colorspace with the specified value.

~Color

~Color()

Member Function Documentation

get_value

std::vector< double >get_value()

Returns:

A list of color component values, each ranging from 0.0 to 1.0.

The values of the color. Not valid for pattern-based colors.

operator!=

booloperator!=(const Color &other)

Parameters

Returns:

true if <code>other</code> is not equal to this.

Inequality.

operator==

booloperator==(const Color &other)

Parameters

other: const Color &

The Color to compare with.

Returns:

true if the two colors are equal, false otherwise.

Two Colors are considered equal if they have the same color space and the same component values.

to_string

std::stringto_string()

Returns:

A string describing the color, including its color space and component values.

Returns a string representation of this Color.