> For the complete documentation index, see [llms.txt](https://tanishisherewith.gitbook.io/archived-legacy-dynamichud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tanishisherewith.gitbook.io/archived-legacy-dynamichud/helpers/colorhelper.md).

# ColorHelper

## ColorHelper

This class provides helper methods for working with colors.

### Methods

#### `getColor(int red, int green, int blue)`

Returns a color as an integer value given its red, green and blue components.

| Parameter | Description                      |
| --------- | -------------------------------- |
| `red`     | The red component of the color   |
| `green`   | The green component of the color |
| `blue`    | The blue component of the color  |

**Returns:** The color as an integer value.

#### `getColor(int red, int green, int blue, int alpha)`

Returns a color as an integer value given its red, green, blue and alpha components.

<table><thead><tr><th width="349">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>red</code></td><td>The red component of the color</td></tr><tr><td><code>green</code></td><td>The green component of the color</td></tr><tr><td><code>blue</code></td><td>The blue component of the color</td></tr><tr><td><code>alpha</code></td><td>The alpha component of the color</td></tr></tbody></table>

**Returns:** The color as an integer value.

#### `getColorFromInt(int color)`

Converts an integer value to a `Color` object.

| Parameter | Description                              |
| --------- | ---------------------------------------- |
| `color`   | The integer value representing the color |

**Returns:** A `Color` object representing the given integer value.

#### `getColorFromHue(float hue)`

Returns a color as an integer value given its hue.

| Parameter | Description          |
| --------- | -------------------- |
| `hue`     | The hue of the color |

**Returns:** The color as an integer value.

#### `ColorToInt(Color color)`

Converts a `Color` object to an integer value.

| Parameter | Description                   |
| --------- | ----------------------------- |
| `color`   | The `Color` object to convert |

**Returns:** The integer representation of the given `Color` object.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tanishisherewith.gitbook.io/archived-legacy-dynamichud/helpers/colorhelper.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
