API reference

Type hierarchy and construction

MultiChannelColors.AbstractMultiChannelColor — Type
AbstractMultiChannelColor{T<:Number,N}

An abstract type for multichannel/multiband/hyperspectral colors. Concrete derived types should have a field, channels, which is a NTuple{N,T}. The channels can be returned with Tuple(c::AbstractMultiChannelColor).

source
MultiChannelColors.MultiChannelColor — Type
MultiChannelColor(i₁, i₂, ...)
MultiChannelColor((i₁, i₂, ...))
MultiChannelColor{T}(...)                # coerce to element type T

Represent multichannel "raw" colors, which lack convert methods to standard color spaces. If c is a MultiChannelColor object, then Tuple(c) is a tuple of intensities (one per channel).

ColorMixture is an alternative with a built-in conversion to RGB.

source
MultiChannelColors.ColorMixture — Type
ColorMixture((rgb₁, rgb₂, ...), (i₁, i₂, ...))
ColorMixture((rgb₁, rgb₂, ...), i₁, i₂, ...)
ColorMixture{T}(...)                       # coerce intensities to element type

Represent a multichannel color with a defined conversion to RGB. rgbⱼ is an RGB color corresponding to channel j, and its intensity is iⱼ. Colors are converted to RGB, convert(RGB, c), using intensity-weighting: rgb = sum(ivalues .* rgbvalues).

MultiChannelColor is an alternative that does not require an rgb list and has no built-in conversion to RGB.

source

Fluorophores

MultiChannelColors.@fluorophore_rgb_str — Macro
rgb = fluorophore_rgb"NAME"

Look up the RGB color associated with a fluorophore hard-coded in the string that follows. This lookup is performed at compile-time, and hence the value of rgb is visible to the compiler and may be constant-propagated.

If the fluorophore name cannot be hard-coded, use the dictionary form fluorophore_rgb[name].

source