# Function Repository Resource:

# CubehelixColorFunction

Generate color functions using the “cubehelix” method

Contributed by: Cody Woodard (Wolfram Research)
 ResourceFunction["CubehelixColorFunction"][options] generate a “cubehelix” color function based on given options.

## Details and Options

The following options can be given:
 "Start" 1/2 beginning hue "Rotations" -3/2 cycles of all hues "Hue" 1 colorfulness of median values "Gamma" 1 emphasis on higher/lower values "MinLight" 0 lightness for minimum values "MaxLight" 1 lightness for maximum values "MinHue" 0 colorfulness of extreme values
“Start” defines the starting hue of the color function, where 1 = red, 2 = green, and 3 = blue. The default value (1/2) is purple.
“Rotations” defines how many times do we cycle through all hues. 0 means that we only use one hue, 1 means that we cycle through all hues once, -2 means that we cycle through all hues twice, but in a reverse direction. The default value (-3/2) means that we cycle through all hues one and a half times, in a reverse direction.
“Hue” (which is really chroma) defines how colorful the function is. 0 means that there is no color, 1 (the default value) means that there is a default amount of color. You can use values greater than 2.6, but they will tend to be over-saturated.
“Gamma” shifts the lightness curve, and should be a value greater than 0, but less than 2. The default value (1) provides a linear curve. Lower values (like 1/4) will lighten all colors but will leave low values dark. Higher values (like 3/4) will darken all colors but will leave high values light.
“MinLight” defines the lightness value for minimum values. The default value is 0, meaning that the minimum value will be black.
“MaxLight” defines the lightness value for maximum values. The default value is 1, meaning that the maximum value will be white.
“MinHue” defines how colorful the extreme values of the function will be. The default value is 0, meaning that the function will be most colorful in the middle, and the minimum/maximum values will have no color.

## Examples

### Basic Examples

 In:= In:= Out= ### Scope

 In:= Out= In:= Out= In:= Out= ### Options

#### “Start”

 In:= Out= #### “Rotations”

 In:= Out= #### “Hue”

 In:= Out= #### “Gamma”

 In:= Out= ### Applications

#### Rainbow

 In:= Out= This is the same as if we used LCHColor directly:

 In:= Out= #### Custom color functions

 In:= Out= In:= Out= ### Neat Examples

#### Animated pastels

 In:= Out= #### Cubehelix Explorer

 In:= Out= 