hsl_to_xyz: Convert HSL to XYZ

View source: R/color-spaces.R

hsl_to_xyzR Documentation

Convert HSL to XYZ

Description

Convert HSL to XYZ

Usage

hsl_to_xyz(hsl, transformation = "sRGB", linear_func = NULL)

Arguments

hsl

A dataframe or matrix with H, S and L colour channels located in the columns 1 to 3, respectively. H in degrees in [0, 360], S and L in [0, 1]

transformation

An option in c("sRGB", "Adobe") for a built-in transformation or, alternatively, a custom 3x3 transformation matrix.

linear_func

A function to convert RGB colour space into linear RGB space. Used only if a custom transformation matrix is provided. Transformation skips if no function is provided under a user-defined transformation matrix. See: https://en.wikipedia.org/wiki/SRGB.

Value

A tibble of X, Y and Z colour channels.


schemr documentation built on June 25, 2024, 9:07 a.m.