# setMoonColor (Client)

> Changes the colour of the moon, over the time cycle, until `resetMoonColor` restores it.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: World and weather
- **URL**: https://wiki.mymp.gg/en/setMoonColor

## Syntax

```lua
bool setMoonColor(color color)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `color` | `color` | Three numbers `r, g, b` (integers from 0 to 255) or a `tocolor` value. Alpha is ignored. |

## Returns

`true` once the colour is set.

## Example

```lua
setMoonColor(200, 220, 255)
```

## See also

- [getMoonColor (Client)](https://wiki.mymp.gg/en/getMoonColor.md): Returns the colour of the moon in use: the one setMoonColor set or, without it, the time cycle's.
- [resetMoonColor (Client)](https://wiki.mymp.gg/en/resetMoonColor.md): Undoes setMoonColor: the moon's colour follows the time cycle again.
