API reference
Type hierarchy and construction
MultiChannelColors.AbstractMultiChannelColor — TypeAbstractMultiChannelColor{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).
MultiChannelColors.MultiChannelColor — TypeMultiChannelColor(i₁, i₂, ...)
MultiChannelColor((i₁, i₂, ...))
MultiChannelColor{T}(...) # coerce to element type TRepresent 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.
MultiChannelColors.ColorMixture — TypeColorMixture((rgb₁, rgb₂, ...), (i₁, i₂, ...))
ColorMixture((rgb₁, rgb₂, ...), i₁, i₂, ...)
ColorMixture{T}(...) # coerce intensities to element typeRepresent 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.
MultiChannelColors.GreenMagenta — TypeGreenMagenta{T}(intensities)
GreenMagenta(intensities)Construct a ColorMixture with the specified intensities that colorizes the first channel with green and the second with magenta.
MultiChannelColors.MagentaGreen — TypeMagentaGreen{T}(intensities)
MagentaGreen(intensities)Construct a ColorMixture with the specified intensities that colorizes the first channel with magenta and the second with green.
Fluorophores
MultiChannelColors.fluorophore_rgb — Constantrgb = fluorophore_rgb[name]Look up the RGB color associated with a fluorophore named name.
MultiChannelColors.@fluorophore_rgb_str — Macrorgb = 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].