# ColorUtil

## Random&#x20;

```etlua
random()
```

## Fade

<pre class="language-lua"><code class="lang-lua"><strong>local color = {
</strong>    r = 20,  
    g = 20,    
    b = 20,    
    a = 100  
  }

fade(10, 2, color) --speed, index, color
</code></pre>

## RainBow

```lua
rainBow(1, 4, 4, 5) -- speed, saturation, brightness, opacity
```

## Gradient

<pre class="language-lua"><code class="lang-lua"><strong>local color1 = {
</strong>    r = 20,  
    g = 100,    
    b = 200,    
    a = 100  
  }
  local color2 = {
    r = 20,  
    g = 20,    
    b = 20,    
    a = 100  
  }
gradient(10, 2, color1, color2) -- speed, index, color1, color2
</code></pre>

## TwoColorEffect

```lua
local color1 = {
    r = 20,  
    g = 100,    
    b = 200,    
    a = 100  
  }
  local color2 = {
    r = 20,  
    g = 20,    
    b = 20,    
    a = 100  
  }
twoColorEffect(10, color1, color2)
```

## Получение цвета клиента&#x20;

```lua
clientColor()
clientBackgroundColor()
```
