Create CIELUV Color Object

Description

Creates a color object in the CIELUV color space. Can be converted to: CIEXYZ, CIELUV, CIELAB, RGB, sRGB, polarLAB, and hexcols. Not allowed (ambiguous) are transformations to HSV and HLS.

Usage

CIELUV(L, U, V, alpha=None)

Arguments

Lint, float, list, numpy.array
Numeric value(s) for L dimension.
Uint, float, list, numpy.array
Numeric value(s) for U dimension.
Vint, float, list, numpy.array
Numeric value(s) for L dimension.
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

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

Examples

from colorspace import CIELUV
# Constructing color object with one single color via float
CIELUV(0, 10, 10)
CIELUV color object (1 colors)
            L       U       V
  1:     0.00   10.00   10.00
# Constructing object via lists
CIELUV([10, 30], [20, 80], [100, 40])
CIELUV color object (2 colors)
            L       U       V
  1:    10.00   20.00  100.00
        30.00   80.00   40.00
# Constructing object via numpy arrays
from numpy import asarray
CIELUV(asarray([10, 30]), asarray([20, 80]), asarray([100, 40]))
CIELUV color object (2 colors)
            L       U       V
  1:    10.00   20.00  100.00
        30.00   80.00   40.00