# NamedColorSpace Class

> Class used to define the color space in use.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2a
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/NamedColorSpace
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/llms.txt

```java
class NamedColorSpace : ColorSpace
```

**Namespace:** `com::datalogics::PDFL`

**Inherits from:** [`ColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ColorSpace.md)

## Description

Class used to define the color space in use.

**Referenced by:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/NamedColorSpace.md)

**Uses types:** [`ColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/ColorSpace.md), [`NamedColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/NamedColorSpace.md), [`PDFObject`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PDFObject.md)

## Fields

### DEVICE_CMYK

```java
static final ColorSpace com.datalogics.PDFL.ColorSpace.DEVICE_CMYK
```

*static*

### DEVICE_GRAY

```java
static final ColorSpace com.datalogics.PDFL.ColorSpace.DEVICE_GRAY
```

*static*

### DEVICE_RGB

```java
static final ColorSpace com.datalogics.PDFL.ColorSpace.DEVICE_RGB
```

*static*

### DEVICE_RGBA

```java
static final ColorSpace com.datalogics.PDFL.ColorSpace.DEVICE_RGBA
```

*static*

### LAB

```java
static final ColorSpace com.datalogics.PDFL.ColorSpace.LAB
```

*static*

### LAB_A

```java
static final ColorSpace com.datalogics.PDFL.ColorSpace.LAB_A
```

*static*

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.ColorSpace.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.NamedColorSpace.delete()
```

**Returns:** `synchronized void`

### equals

```java
boolean com.datalogics.PDFL.NamedColorSpace.equals(Object rhs)
```

**Parameters**

- `rhs` (`Object`)

**Returns:** `boolean`

### finalize

```java
void com.datalogics.PDFL.NamedColorSpace.finalize()
```

*protected*

**Returns:** `void`

### getName

```java
String com.datalogics.PDFL.ColorSpace.getName()
```

**Returns:** `String`

The name of the color space. A named color space may be named something like DeviceRGB. More complicated color spaces may have a name like Indexed or ICCBased.

### getNumComponents

```java
int com.datalogics.PDFL.ColorSpace.getNumComponents()
```

**Returns:** `int`

The number of components in the color space.

### getPDFObject

```java
PDFObject com.datalogics.PDFL.ColorSpace.getPDFObject()
```

**Returns:** [`PDFObject`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/PDFObject.md)

The PDFObject associated with the color space.

Get the PDFObject associated with the color space. This may be a PDFName, PDFDict, PDFStream, or PDFArray.

### makeDeviceRGBA

```java
static NamedColorSpace com.datalogics.PDFL.NamedColorSpace.makeDeviceRGBA()
```

*static*

**Returns:** [`NamedColorSpace`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2a/class/NamedColorSpace.md)

### toString

```java
String com.datalogics.PDFL.ColorSpace.toString()
```

**Returns:** `String`

Convert a colorSpace to a string.
