Table of Contents

Class DeviceGray

Namespace
iText.Kernel.Colors
Assembly
itext.kernel.dll

Color space to specify shades of gray color.

public class DeviceGray : Color
Inheritance
DeviceGray
Inherited Members

Constructors

DeviceGray()

Creates DeviceGray color with grayscale value initialised as zero.

public DeviceGray()

DeviceGray(float)

Creates DeviceGray color by given grayscale.

public DeviceGray(float value)

Parameters

value float

the grayscale value

Remarks

Creates DeviceGray color by given grayscale. The grayscale is considered to be in [0, 1] interval, if not, the grayscale will be considered as 1 (when grayscale's value is bigger than 1) or 0 (when grayscale's value is less than 0).

Fields

BLACK

Predefined black DeviceGray color.

public static readonly DeviceGray BLACK

Field Value

DeviceGray

GRAY

Predefined gray DeviceGray color.

public static readonly DeviceGray GRAY

Field Value

DeviceGray

WHITE

Predefined white DeviceGray color.

public static readonly DeviceGray WHITE

Field Value

DeviceGray

Methods

MakeDarker(DeviceGray)

Returns DeviceGray color which is darker than given one

public static DeviceGray MakeDarker(DeviceGray grayColor)

Parameters

grayColor DeviceGray

the DeviceGray color to be made darker

Returns

DeviceGray

darker color

MakeLighter(DeviceGray)

Returns DeviceGray color which is lighter than given one

public static DeviceGray MakeLighter(DeviceGray grayColor)

Parameters

grayColor DeviceGray

the DeviceGray color to be made lighter

Returns

DeviceGray

lighter color