Skip to contents

Just like grDevices::convertColor, but with HSV as an option.

Usage

col2col(
  pixel_matrix,
  from = c("sRGB", "Lab", "Luv", "HSV"),
  to = c("sRGB", "Lab", "Luv", "HSV"),
  ref_white = "D65"
)

Arguments

pixel_matrix

A matrix of pixel colors, rows are pixels and columns are channels.

from

Color space to convert from.

to

Color space to convert to.

ref_white

Reference white.

Value

A pixel matrix in the specified to color space.

Details

As my mother used to say: good enough for government work.