cmplx2col: Convert complex numbers to color

View source: R/cmplx2col.R

cmplx2colR Documentation

Convert complex numbers to color

Description

Converts a complex number (or a vector/array thereof) into a color-string, such that brightness represents the complex amplitude and hue represents the complex phase.

Usage

cmplx2col(z, max = NULL, hue = 0, saturation = 1, gamma = 1)

Arguments

z

complex number or vector/array of complex numbers

max

value of the complex module that corresponds to full brightness; if not given, this is set equal to the maximum complex amplitude in z.

hue

hue value of positive reals

saturation

saturation value of colors

gamma

positive number to adjust the non-linearity of the color scale (1=linear)

Value

Returns a single color or vector/array of colors

Author(s)

Danail Obreschkow


obreschkow/cooltools documentation built on Nov. 16, 2024, 2:46 a.m.