[R] package colorspace and .WhitePoint question

Glenn Davis d@vi@glenn@1952 @ending from gm@il@com
Mon Jun 4 03:54:33 CEST 2018

 In colorspace.R  I see:

    setAs("color", "LAB", function(from)
      LAB(.Call("as_LAB", from using coords, class(from), .WhitePoint, PACKAGE = "
          names = dimnames(from using coords)[[1]]))
    .WhitePoint = NULL

and then in colorspace.c and the function CheckWhite(),
I see that .WhitePoint = NULL is converted to D65.

I would like to pass a different .WhitePoint to
    as( XYZ( 100,100,100)  , "LAB" )

I have tried 3 methods:
    as( XYZ( 100,100,100)  , "LAB", .WhitePoint=XYZ(95,100,105) )
    .WhitePoint = XYZ(95,100,105)
    assign( ".WhitePoint", XYZ(95,100,105), env=as.environment('package:
colorspace') )
but all fail, for different reasons.

How can I transform XYZ to LAB using a whitepoint different than D65 ?

Glenn Davis
gdavis using gluonics.com

	[[alternative HTML version deleted]]

More information about the R-help mailing list