---
title: "ColorSpace"
url: "https://reference.aspose.com/pdf/java/com.aspose.pdf/colorspace/"
product: "Aspose.PDF for Java API Reference"
description: "The color spaces enumeration."
---

**Inheritance:**
java.lang.Object, java.lang.Enum < ColorSpace > com.aspose.pdf.ColorSpace, java.lang.Enum < ColorSpace >, com.aspose.pdf.ColorSpace

**All Implemented Interfaces:**
Serializable, Comparable < ColorSpace >

```
public enum ColorSpace extends Enum < ColorSpace >
```

The color spaces enumeration.

## Fields

| Field | Description |
| --- | --- |
| [DeviceCMYK](#DeviceCMYK) | The device-dependent CMYK color space. |
| [DeviceGray](#DeviceGray) | The device-dependent gray color space. |
| [DeviceRGB](#DeviceRGB) | The device-dependent RGB color space. |

## Methods

| Method | Description |
| --- | --- |
| [getByValue](#getByValue-int-) |  |
| [getValue](#getValue--) |  |
| [valueOf](#valueOf-java.lang.String-) | Returns the enum constant of this type with the specified name. |
| [values](#values--) | Returns an array containing the constants of this enum type, in the order they are declared. |

### DeviceCMYK {#DeviceCMYK}
```
public static final ColorSpace DeviceCMYK
```

The device-dependent CMYK color space.

### DeviceGray {#DeviceGray}
```
public static final ColorSpace DeviceGray
```

The device-dependent gray color space.

### DeviceRGB {#DeviceRGB}
```
public static final ColorSpace DeviceRGB
```

The device-dependent RGB color space.

### getByValue {#getByValue-int-}
```
public static ColorSpace getByValue(int value)
```



**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value |  |  |

### getValue {#getValue--}
```
public int getValue()
```



### valueOf {#valueOf-java.lang.String-}
Returns the enum constant of this type with the specified name.

### values {#values--}
```
public static ColorSpace [] values()
```

Returns an array containing the constants of this enum type, in the order they are declared.

**Returns:**
an array containing the constants of this enum type, in the order they are declared
