Displaying 20 results from an estimated 7000 matches similar to: "invalid colour name 'rgb(1.000,0,0)' error"
2012 Jul 10
2
RGB components of plot() colours
A quick question:
Is there anywhere a listing of the RGB components of the
named colours listed by colors()?
For example, where would I find the RGB for "orange1"
or "salmon"?
When I look at an EPS file from R where I have used
these colours, it seems that for:
"salmon":
0.9804 0.5020 0.4471 rgb
"orange1":
1 0.6471 0 rgb
However, this is a tedious way
2012 Mar 22
2
How to draw table in Latex without using xtable?
Hi,
I am working on table suing R and Latex. I am writing .Rnw file first in
which i m reading input file and storing into dataframe. After filtering
certain values from this dataframe. I am planning to display it. I don't
want to use xtable since i need to change column names.
*Sample .Rnw file*
@
<<echo=FALSE>>=
cat("\begin{table}[ht]")
2000 Dec 15
1
Colour to RGB value?
There are a lot of ways to specify colours in R plot functions (number
from the palette, by name, etc.). I'd like to pass a colour from an R
function to an external function, and I'd like it to have the same
flexibility. To avoid having to interpret all possible colour
specifications myself, I need a function to convert a general colour
specification into a standard form (e.g. r,g,b
2012 Aug 01
2
How to increase lenght of axis according input data?
Hi,
I am working on barplot. I need to plot x-axis but scale on x axis is very
upto 15 while my data is upto 19.
pdf("image.pdf", width=10 , height =13)
par(mar=c(5,22.5,2,2))
barplot(t(data[,2:3]), beside=TRUE, col=c(rgb(.537, .769, .933),rgb(.059,
.412, .659)), width = 1, horiz=TRUE,cex.names=.9, border ="white",las=1,
cex.axis= 1, cex.lab=1.2)
2004 Sep 17
1
Confused about specifying plot colors as RGB values
Based on reading 'rgb' documentation, I would have thought
the following would have produced identical results. Can
someone explain how to make this happen? I need to be able
to specify an array of rgb values for the 'col' parameter.
colnames.col <- c("black", "red", "blue", "green")
colnames.rgb <- apply(as.matrix(colnames.col), 1,
2007 Mar 08
2
alpha parameter in function rgb to specify color
Hi All,
In function "rgb", alpha parameter is supposed to set
the transparency value. But in my following two
examples, it didn't work:
plot(1,col = rgb(1,0,0,alpha =0.8))
# as long as alpha < 1, there is no point in the plot.
plot(1,col = rgb(0,0,255, alpha=254,
maxColorValue=255))
# as long as alpha < 255, there is no point in the
plot.
Do I use it in the right way? Any
2006 Mar 02
1
extracting RGB values from a colorspace class object
Greetings,
After pouring over the documentation for the 'colorspace' package, I have not
been able to figure out how the plot() method converts colorspace coordinates
to RGB values for display on the screen. I am convert between colorspaces
with the various as() methods... but cannot seem to find a way to extract RGB
(i.e. for displaying on a computer screen) triplets from color space
2006 Aug 01
2
rgb and col2rgb color conversion/modification/shading
I want to get a lighter shade of a color...I have a lot of colored objects and
want each one printed as a foreground against a slightly lighter background.
I thought I could try something like changing the alpha channel by first
converting it to rgb.
But prior to trying that, I'm stuck with how to get the color after converting
using col2rgb() to be interpreted again as a color, rather than
2005 Feb 09
2
Converting RGB YUV and back
Hi all,
how can I convert a RGB (24 or 32) image I'm getting from a webcam for
example to YUV to compress it with theora, decompress it and convert it back
to RGB to draw it?
Any suggestions?
Best regards,
Florian
(Stuttgart, GERMANY)
2009 Nov 30
4
Is there a way to convert rgb/hex value to a (nearest) color name?
Hi all, I'm trying to convert a series of rgb codes into a color name.
What is my easiest option? So far I'm stuck with just converting to
hex using rgb() and I know R knows a number of colours() but a mapping
of the two has failed me.
Any help in this regard will be highly appreciated.
Regards,
George
2006 Jul 31
1
RGB function
Hi all,
I created three separate square matrices (lets say R, G, and B). each
one contains a series of values between 0 and 1. I want to be able to
take for example R[1], G[1], B[1] and create a rgb color value into a
fourth matrix. I tried using the rgb function but I must be doing
something wrong because it fails with the following error message.
(list) object cannot be coerced to
2009 Jun 16
2
YCbCr <-> RGB conversion question
Hi,
I coded some routines for YCbCr <-> RGB conversion, both using
floating point numbers and using integer arithmetics, code is
attached.
Let's say I want to convert from RGB to YCbCr and back. First the
integer arithmetics:
In [1]: from colors import *
In [2]: a = [255, 0, 255]
In [3]: RGB2YCbCr(a)
Out[3]: (107, 202, 222)
In [4]: YCbCr2RGB(RGB2YCbCr(a))
Out[4]: array([255, 1,
2006 Aug 20
1
Simple RGB->YUV Stuff...
I've spent the weekend or so trying to get my head around Theora and I'm
just not having any luck. First of all, I really don't have any interest
in immersing myself in video encoding--I just have one simple thing I'd
like to do--so I haven't spent any time reading about the theory or
specs or anything like that.
I'm attempting to write a "render-to-theora"
2007 May 03
1
converting YUV to RGB
Hello all,
I'd like to convert the theora yuv_buffer to RGB that I can render onto a
texture.
Googling around, there are a tone of different formulae to do so.
There is this (with lots of corrections and amendments further down the
page):
http://www.fourcc.org/fccyvrgb.php <http://www.fourcc.org/fccyvrgb.php>
and there is the MSDN stuff that says you need to convert 4:2:0 and
2005 Mar 14
1
question from beginner (YCbCr to RGB)
Hello, i'm sorry for my English is not good.
I need help with convert yuv_buffer data (YCbCr) to RGB without SDL.
I write:
BYTE *frame=new BYTE[YUV_BUFFER.y_height*YUV_BUFFER.y_width*4];
for(int cc=0; cc<YUV_BUFFER.y_height*YUV_BUFFER.y_width; cc++)
{
frame[cc*4+0]=YUV_BUFFER.y[cc]+1.371*(YUV_BUFFER.v[cc]-128);
2007 Nov 20
5
yuv - rgb conversion without contrast decrease.
Hello list,
When I convert an yuv pixel into rgb using the recipies in
http://www.fourcc.org/fccyvrgb.php I get an accurate color conversion
but the contrast seems to be decreased. If i write, e.g., the pixel
directly into an sdl yuv_overlay, I get a well-contrasted frame,
however, if I convert the pixel to rgb and call SDL_MapRGB, I get a
contrast-decreased frame.
Thanks,
Ribamar
2008 Feb 05
2
using image to show RGB image data ?
Hello all,
I'm now using image() to show image data (in my case dumps of SOM
weights) but would like to show RGB colour data, not just single "z"
colour values.
I've currently been using seq() to skip 4 values, so I can show the R, G
or B channels separately as "z". But is there a way I can show all three
channels simultaneously as a proper colour image?
Thanks,
B.
2001 Aug 30
1
imagenrgb: Function to display RGB images in R
I've writen this function (imagenrgb)
to display a (m,n,3) array
as a RGB image with ngris^3 colors and,optionally,
stretching. If option ver=F, it does not
display but saves a pseudocolor version of the image
as a list (so that subsequent displays are faster).
I'd appreciate feedback and improvements
and hope that it's useful for others.
Example of use:
> dim(imatest)
[1] 100
2012 Nov 01
1
How to parse xml with same key name ?
HI,
I need to parse an xml where key name are same but values are different.
<root>
<test>
Some dummy text
</test>
<node id="1">one</node>
<node id="2">two</node>
<node id="3">three</node>
</root>
When i use xmlGetAttr() function i always get one as value. How
2012 Nov 22
1
How to read jpeg image with russian font in R?
Hi,
I m working on R and read one image with russian font using readjpeg()
function and write it on pdf (using grid). But russian text is not visible
on pdf. How can i fix my pblm?
Regards <http://r.789695.n4.nabble.com/file/n4650417/pointer.jpg>
library(JPEG)
library(grid)
pdf("out.pdf" , width = 6.6 ,height = 4.2,family= "URWHelvetica",
encoding="KOI8-R")