> For the complete documentation index, see [llms.txt](https://pahutyakv.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pahutyakv.gitbook.io/docs/mega-extension-pack/color.md).

# Color

#### **With**

* `WithAlpha(float alpha)` — Returns a new color with the specified alpha value.
* `WithSaturation(float saturation)` — Returns a new color with the specified saturation value.
* `WithHue(float hue)` — Returns a new color with the specified hue value.
* `WithBrightness(float brightness)` — Returns a new color with the specified brightness value.

***

#### **To**

* `ToDarken(float factor)` — Darkens the color by the specified factor.
* `ToLighten(float factor)` — Lightens the color by the specified factor.
* `ToGrayscale()` — Converts the color to grayscale using standard luminance weighting.
* `ToWarm(float factor)` — Returns a warmer version of the color by blending it towards an orange tone.
* `ToCool(float factor)` — Returns a cooler version of the color by blending it towards a blue tone.

***

#### **Operations**

* `Invert()` — Returns the inverted color.
* `Mix(Color other, float blend)` — Blends the color with another color by the specified blend factor.
