---
title: "Color.FromCmyk"
url: "https://reference.aspose.com/html/java/com.aspose.html.drawing/color/fromcmyk/"
product: "Aspose.HTML for Java API Reference"
description: "Color method. Returns a new Color with the requested cyan magenta yellow key black values"
---

## Color.FromCmyk method

Returns a new Color with the requested cyan, magenta, yellow, key (black) values.

```java
public static Color FromCmyk(float cyan, float magenta, float yellow, float key)
```

| Parameter | Type | Description |
| --- | --- | --- |
| cyan | Single | A float that represents the cyan component of the color. |
| magenta | Single | A float that represents the magenta component of the color. |
| yellow | Single | A float that represents the yellow component of the color. |
| key | Single | A float that represents the key component of the color. |

### Return Value

A new instance of the [`Color`](../) class

### See Also

* class [Color](../)
* package [com.aspose.html.drawing](../../../com.aspose.html.drawing/)
* package [Aspose.HTML](../../../)
