Description Usage Arguments Details Value Note Author(s) Examples
Objects of class "shade"
are simply standard R character vectors
representing one or more 8-bit (s)RGB colours in CSS-like hex format, but
with extra attributes giving the current colour space and coordinates.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | shade(x, ...)
## S3 method for class 'shade'
shade(x, ...)
## S3 method for class 'color'
shade(x, ...)
## S3 method for class 'matrix'
shade(x, space = "sRGB", alpha = NULL, ...)
## S3 method for class 'character'
shade(x, ...)
## Default S3 method:
shade(x, ...)
## S3 method for class 'shade'
print(x, ...)
## S3 method for class 'shade'
x[i]
## S3 replacement method for class 'shade'
x[i] <- value
## S3 method for class 'shade'
c(...)
## S3 method for class 'shade'
rep(x, ...)
## S3 method for class 'shade'
rev(x)
## S3 method for class 'shade'
x == y
## S3 method for class 'shade'
x != y
## S3 method for class 'equal.shade'
all(target, current, hexonly = FALSE, ...)
|
x, y |
R objects, or |
... |
Additional parameters to methods. For |
space |
For a matrix, the space in which coordinates are being provided. |
alpha |
For a matrix, an associated vector of opacity values between 0 and 1, if required. |
i |
An index vector. |
value |
A vector of replacement colours. |
target, current |
Shade vectors to compare. |
hexonly |
If |
Comparison between "shade"
objects x
and y
is achieved
by converting y
(the second argument) into the colour space of
x
and then comparing coordinates, after any clipping.
A character vector of class "shade"
, with additional
attributes as follows.
space |
A string naming a color space. |
coords |
A matrix giving colour coordinates in the relevant space, one colour per row. |
When concatenating, shades that are all from the same space will remain in that space, but shades from different spaces will be warped to “XYZ” space.
Jon Clayden <code@clayden.org>
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.