From m@ech|er @end|ng |rom @t@t@m@th@ethz@ch  Wed Dec  2 09:45:27 2020
From: m@ech|er @end|ng |rom @t@t@m@th@ethz@ch (Martin Maechler)
Date: Wed, 2 Dec 2020 09:45:27 +0100
Subject: [Rd] undocumented 'offset' argument in
 src/library/grDevices/man/adjustcolor.Rd
In-Reply-To: <70078b99-0c2e-d456-a2e5-088c3a2cd49f@gmail.com>
References: <70078b99-0c2e-d456-a2e5-088c3a2cd49f@gmail.com>
Message-ID: <24519.21543.662505.904535@stat.math.ethz.ch>

>>>>> Ben Bolker 
>>>>>     on Mon, 30 Nov 2020 16:33:23 -0500 writes:

    > The 'offset' argument description is blank ...
    > maybe 'additive adjustment to each of the (red, green, blue, alpha) 
    > values defining the colors, after adjustment by the corresponding 
    > \code{.f} factor' ...?

Thank you, Ben.   I'm using adjustcolor() very often, and I had
also wondered about the documentation "FIXME" there.

As I've not been a real expert in color space transformations, I
hadn't dared to describe it myself,  but your description above
is clearly better than the emptyness ...

Maybe someone can add something, or contribute some example(s)
on how using offset != 0  makes sense ?

    > This is the relevant code:

>      x <- col2rgb(col, alpha = TRUE)/255
>      x[] <- pmax(0, pmin(1,
>                          transform %*% x +
>                          matrix(offset, nrow = 4L, ncol = ncol(x))))
>      rgb(x[1L,], x[2L,], x[3L,], x[4L,])



[Rd] undocumented 'offset' argument in src/library/grDevices/man/adjustcolor.Rd
Martin Maechler