# brighten

Brighten or darken colormap

## Syntax

`brighten(beta)brighten(h,beta)newmap = brighten(beta)newmap = brighten(cmap,beta)`

## Description

`brighten(beta)` increases or decreases the color intensities in a colormap by replacing the current colormap with a brighter or darker colormap of essentially the same colors. The modified colormap is brighter if ```0 < beta < 1``` and darker if `-1 < beta < 0`. `brighten(beta)`, followed by `brighten(-beta)`, where ```beta < 1```, restores the original map.

`brighten(h,beta)` brightens all objects that are children of the figure having the handle `h`.

`newmap = brighten(beta)` returns a brighter or darker version of the current colormap without changing the display.

`newmap = brighten(cmap,beta)` returns a brighter or darker version of the colormap `cmap` without changing the display.

## Examples

collapse all

### Brighten Colormap

Display a surface plot of `membrane`.

```surf(membrane) ```

Brighten the colormap.

```beta = .7; brighten(beta) ```

collapse all

### Algorithms

`brighten` raises values in the colormap to the power of gamma, where gamma is

$\gamma =\left\{\begin{array}{cc}1-\beta ,& \beta >0\\ \frac{1}{1+\beta },& \beta \le 0\end{array}$

`brighten` has no effect on graphics objects defined with true color.