Create polarLUV (HCL) Color Object

Description

Creates a color object in the polar representation of the CIELUV color space, also known as the Hue-Chroma-Luminance (HCL) color space. Can be converted to: CIEXYZ, CIELUV, CIELAB, RGB, sRGB, polarLAB, and hexcols. Not allowed (ambiguous) are transformations to HSV and HLS.

Usage

polarLUV(H, C, L, alpha=None)

Arguments

Hint, float, list, numpy.array
Numeric value(s) for hue dimension ([-360., 360.]).
Cint, float, list, numpy.array
Numeric value(s) for chroma dimension ([0., 100.+]).
Lint, float, list, numpy.array
Numeric value(s) for luminance dimension ([0., 100.]).
alphaNone, float, list, numpy.array
Numeric value(s) for the alpha channel ([0., 1.]) where 0. equals full transparency, 1. full opacity. If None (default) no transparency is added.

Methods

polarLUV.colors(fixup=True, rev=False)
Extract Hex Colors
polarLUV.dropalpha()
Remove Alpha Channel
polarLUV.get(dimname=None)
Extracting Color Coordinates
polarLUV.get_whitepoint()
Get White Point
polarLUV.hasalpha()
Check for Alpha Channel
polarLUV.hclplot(**kwargs)
Palette Plot in HCL Space
polarLUV.length()
Get Number of Colors
polarLUV.set(**kwargs)
Set Coordinates/Manipulate Colors
polarLUV.set_whitepoint(**kwargs)
Set White Point
polarLUV.specplot(**kwargs)
Color Spectrum Plot
polarLUV.swatchplot(**kwargs)
Palette Swatch Plot
polarLUV.to(to, fixup=True)
Transform Color Space

Examples

from colorspace import polarLUV, HCL
# Constructing color object with one single color via float
polarLUV(100., 30, 50.)
polarLUV color object (1 colors)
            H       C       L
  1:   100.00   30.00   50.00
# polarLUV is the HCL color space, this
#  is equivalent to the command above.
HCL(100., 30, 50.)
polarLUV color object (1 colors)
            H       C       L
  1:   100.00   30.00   50.00
# Constructing object via lists
HCL([100, 80], [30, 50], [30, 80])
polarLUV color object (2 colors)
            H       C       L
  1:   100.00   30.00   30.00
        80.00   50.00   80.00
# Constructing object via numpy arrays
from numpy import asarray
HCL(asarray([100, 80]), asarray([30, 50]), asarray([30, 80]))
polarLUV color object (2 colors)
            H       C       L
  1:   100.00   30.00   30.00
        80.00   50.00   80.00