XYZ2RGB: convert from XYZ coordinates to CIE RGB coordinates

Description Usage Arguments Value Author(s) Source References Examples

View source: R/colorscience.R

Description

XYZ2RGB convert from XYZ coordinates to CIE RGB coordinates.

Usage

1
2
3
4
5
6
7
XYZ2RGB(XYZmatrix, illuminant = "D65", observer = 2, RefWhite
                 = get("XYZperfectreflectingdiffuser", envir = environment()),
                 RGBModel = "sRGB", RefWhiteRGB = get("whitepointsRGB", 
                 envir = environment()), gamma = NA,
                 RefWhiteIllum = get("XYZperfectreflectingdiffuser",
                 envir = environment()), CAT = "Bradford",
                 CATarray = get("ChromaticAdaptation", envir = environment())) 

Arguments

XYZmatrix

XYZ coordinates

illuminant

illuminant

observer

observer

RefWhite

Reference White

RGBModel

RGB model

RefWhiteRGB

white points for RGB model

gamma

gamma

RefWhiteIllum

Reference perfect reflecting diffuser

CAT

CAT

CATarray

Chromatic Adaptation

Value

CIE RGB coordinates

Author(s)

Jose Gama

Source

Bruce Justin Lindbloom, 2014 http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_T.html

References

Bruce Justin Lindbloom, 2014 http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_T.html

Examples

1
2
XYZ<-c(0.11465380, 0.08391198, 0.08222077)
XYZ2RGB(XYZ)

Example output

Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: 'Hmisc'

The following objects are masked from 'package:base':

    format.pval, round.POSIXt, trunc.POSIXt, units

Loading required package: munsellinterpol
Loading required package: geometry
Loading required package: magic
Loading required package: abind
Loading required package: pracma

Attaching package: 'pracma'

The following object is masked from 'package:munsellinterpol':

    hypot

The following objects are masked from 'package:geometry':

    dot, polyarea

The following object is masked from 'package:magic':

    magic

The following object is masked from 'package:Hmisc':

    ceil

Loading required package: sp

Attaching package: 'colorscience'

The following objects are masked from 'package:munsellinterpol':

    XYZ2xyY, xyY2XYZ

          [,1]      [,2]      [,3]
[1,] 0.4862747 0.2470587 0.3058824

colorscience documentation built on May 29, 2017, 2:34 p.m.