ColorSpace#

Represents the color space of a Pixmap.

Class API

class ColorSpace#
ColorSpace(int type)#
ColorSpace(ColorSpace cs)#

Constructor

Parameters:

n (int) – A number identifying the colorspace. Possible values are CS_RGB, CS_GRAY and CS_CMYK.

Name#

The name identifying the colorspace.

Type:

string

N#

The number of bytes required to define the color of one pixel.

type:

int

Predefined ColorSpaces

For saving some typing effort, there exist predefined colorspace objects for the three available cases.

  • csRGB = new ColorSpace(Utils.CS_RGB)

  • csGRAY = new ColorSpace(Utils.CS_GRAY)

  • csCMYK = new ColorSpace(Utils.CS_CMYK)