Color Class Documentation

class Color

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(double c, double m, double y, double k)

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(double grey)

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(double r, double g, double b)

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:

std::vector< double >

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!=

bool operator!=(const Color & other)

Parameters

Returns:

bool

true if other is not equal to this.

Inequality.

operator==

bool operator==(const Color & other)

Parameters

other: const Color &

The Color to compare with.

Returns:

bool

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::string to_string()

Returns:

std::string

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

Returns a string representation of this Color.