colourtools(spatstat)
colourtools()所属R语言包:spatstat
Convert and Compare Colours in Different Formats
颜色以不同的格式转换和比较
译者:生物统计家园网 机器人LoveR
描述----------Description----------
These functions convert between different formats for specifying a colour in R, and determine whether colours are equivalent.
这些功能之间转换的不同的格式指定的颜色在R中,并判断是否是等价的颜色。
用法----------Usage----------
col2hex(x)
rgb2hex(v)
paletteindex(x)
samecolour(x,y)
参数----------Arguments----------
参数:x,y
Any valid specification for a colour or sequence of colours accepted by col2rgb.
任何有效的规范或接受col2rgb序列的颜色的颜色。
参数:v
A numeric vector of length 3, giving the RGB values (0 to 255) of a single colour, or a 3-column matrix giving the RGB values of several colours.
数值矢量的长度为3,给出一个单一的颜色,或具有3列的矩阵给出几种颜色的RGB值的RGB值(0到255)。
Details
详细信息----------Details----------
col2hex converts colours specified in any format into their hexadecimal character codes.
col2hex转换任何格式的十六进制字符代码中指定的颜色。
rgb2hex converts RGB colour values into their hexadecimal character codes.
rgb2hex RGB颜色值转换成十六进制字符代码。
paletteindex checks whether the colour or colours specified by x are available in the default palette returned by palette(). If so, it returns the index or indices of the colours in the palette. If not, it returns NA.
paletteindex检查是否指定的x或多种颜色可在默认的调色板返回palette()。如果是这样,它返回的颜色在调色板中的索引或索引。如果不是,它返回NA。
samecolour decides whether two colours x and y are equivalent.
samecolour决定是否两种颜色x和y是等价的。
值----------Value----------
For col2hex and rgb2hex, a character vector containing hexadecimal colour codes.
对于col2hex和rgb2hex,字符向量的十六进制颜色代码。
For paletteindex, an integer vector, possibly containing NA values.
对于paletteindex,整数向量,可能包含NA值。
For samecolour, a logical value or logical vector.
对于samecolour,逻辑值或逻辑的向量。
警告----------Warning----------
paletteindex("green") returns NA because the green colour in the default palette is called "green3".
paletteindex("green")返回NA因为在默认的绿色调色板的名字叫做"green3"。
(作者)----------Author(s)----------
Adrian Baddeley
<a href="mailto:Adrian.Baddeley@csiro.au">Adrian.Baddeley@csiro.au</a>
<a href="http://www.maths.uwa.edu.au/~adrian/">http://www.maths.uwa.edu.au/~adrian/</a>
and Rolf Turner
<a href="mailto:r.turner@auckland.ac.nz">r.turner@auckland.ac.nz</a>
参见----------See Also----------
col2rgb, palette
col2rgb,palette
实例----------Examples----------
samecolour("grey", "gray")
paletteindex("grey")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|