---
title: "CmxColor"
url: "https://reference.aspose.com/imaging/java/com.aspose.imaging.fileformats.cmx.objectmodel.styles/cmxcolor/"
product: "Aspose.Imaging for Java API Reference"
description: "Represents a color value."
---

**Inheritance:**
java.lang.Object
```
public class CmxColor
```

Represents a color value.
## Constructors

| Constructor | Description |
| --- | --- |
| [CmxColor()](#CmxColor--) |  |
| [CmxColor(int colorModel, long value)](#CmxColor-int-long-) | Creates a new CmxColor |
## Methods

| Method | Description |
| --- | --- |
| [getColorModel()](#getColorModel--) | Gets the color model. |
| [setColorModel(int value)](#setColorModel-int-) | Sets the color model. |
| [getValue()](#getValue--) | Gets the color value. |
| [setValue(long value)](#setValue-long-) | Sets the color value. |
| [toString()](#toString--) | Returns a String that represents this instance. |
| [equals(Object o)](#equals-java.lang.Object-) | Check if objects are equal. |
| [hashCode()](#hashCode--) | Get hash code of the current object. |
### CmxColor() {#CmxColor--}
```
public CmxColor()
```


### CmxColor(int colorModel, long value) {#CmxColor-int-long-}
```
public CmxColor(int colorModel, long value)
```


Creates a new CmxColor

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| colorModel | int | the color model. |
| value | long | The color value. |

### getColorModel() {#getColorModel--}
```
public final int getColorModel()
```


Gets the color model.

**Returns:**
int - the color model.
### setColorModel(int value) {#setColorModel-int-}
```
public final void setColorModel(int value)
```


Sets the color model.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | the color model. |

### getValue() {#getValue--}
```
public final long getValue()
```


Gets the color value.

**Returns:**
long - the color value.
### setValue(long value) {#setValue-long-}
```
public final void setValue(long value)
```


Sets the color value.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | long | the color value. |

### toString() {#toString--}
```
public String toString()
```


Returns a String that represents this instance.

**Returns:**
java.lang.String - A String that represents this instance.
### equals(Object o) {#equals-java.lang.Object-}
```
public boolean equals(Object o)
```


Check if objects are equal.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| o | java.lang.Object | The other object. |

**Returns:**
boolean - The equality comparison result.
### hashCode() {#hashCode--}
```
public int hashCode()
```


Get hash code of the current object.

**Returns:**
int - The hash code.
