similar to: Is there a way to convert rgb/hex value to a (nearest) color name?

Displaying 20 results from an estimated 600 matches similar to: "Is there a way to convert rgb/hex value to a (nearest) color name?"

2009 Sep 14
1
How do I ensure that the minimum value is always displayed on a y-axis in a plot?
Good day all, I'm trying to plot a figure and ensure that the minimum and maximum values are always displayed. However, the code below does not display the minimum value, no matter what I try. Could someone please help? Thanking you in advance, George. Code below for reproduction (apologies if the paste is too long) >blah [1] 0.41955516 0.37330949 0.37934005 0.38013805 0.40092939
2009 Sep 16
1
Is there a way to round numbers up or down to the nearest "natural looking" number?
Hi all, Given the following series of numbers: > t [1] 21.85000 30.90410 43.71000 61.82234 87.43999 123.67296 [7] 174.91997 247.40249 349.91996 494.91815 700.00000 What's the simplest way of formatting them into the nearest "natural looking" (rounded to nearest multiple of 10) numbers? So: t[1] becomes 20 t[2] becomes 30 t[3] becomes 40 t[4] becomes 60 t[5] becomes 90
2009 Aug 07
3
How do I plot a line followed by two forecast points?
Good day all, I'm trying to plot a continuous line plot, which is followed by two forecast points eg. one forecast point is 12 months out, and another 24 months out from the last date of the line plot. In my attempts so far, the second plot (the forecast points) is scaled against a new axis scale, thus the two plots are not directly comparable (I need the forecast points to be scaled
2009 Aug 11
1
How do I plot: regression line, regression line + s.d, regression line - s.d on the same chart?
Hello all, I've got a scatter plot, for which I create a regression line using: reg<- lm(yvars~xvars) and can plot the regression through the scatter just fine. I'd like to add two additional lines on the scatter plot: one being regressionline+standard deviation, the other being regressionline-standard deviation, thus creating some kind of 'band' for the scatter. Any help will
2009 Aug 28
1
Has any one tested R 2.9.2 on Snow Leopard?
Hi all, not sure if this is the right place to ask this but R not being such a "mainstream" app, can't find the answer anywhere. I plan to upgrade to Snow asap and just wondering if anyone else has already and has successfully used R on Mac OSX 10.6. If so, what version? and is it running in 64 bit mode? Thanks in advance, George.
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
2016 Apr 16
2
Mean of hexadecimal numbers
... and if you need to convert back: ?as.hexmode -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sat, Apr 16, 2016 at 8:20 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > ?strtoi > > You'll have to remove
2016 Apr 16
0
Mean of hexadecimal numbers
On 16/04/2016 8:47 AM, Atte Tenkanen wrote: > Hi, > > How would you calculate the "mean colour" of several colours, for > example c("#FF7C00","#00BF40","#FFFF00")? > Bert answered your subject line question. Your text is asking something else: if those are colours, you don't want to treat each of them as a single integer. A
2016 Apr 16
1
Mean of hexadecimal numbers
Hm..., Should these two versions produce the same solution? Unfortunately and shame to confess, I don't know much about the colors in R: myColors <- c("#FF7C00","#00BF40","#FFFF00") Colors=rgb2hsv(col2rgb(myColors)) apply(Colors,1,mean) h s v 0.2122974 1.0000000 0.9163399 * * * * * # Average the 1st two by taking the middle colour
2016 Apr 16
0
Mean of hexadecimal numbers
Since these are color strings, you can use functions in the grDevices package (other others) to manipulate them. E.g., you can convert them to various color spaces and perhaps use the mean in one of those spaces as your 'average color'. > myColors <- c(One="#FF7C00",Two="#00BF40",Three="#FFFF00") > col2rgb(myColors) One Two Three red
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,
2009 Sep 16
1
Can someone please explain why the last tick mark on this chart is not showing?
Hi all, I'm trying to log chart but with natural looking tick marks. My specifications are very specific -- it must indicate the lowest number's tick as well as the maximum. I've attached sample code and data for a particular case (and there are a few more like this) where the bottom tickmarks on the chart are not set to where I want them to be and yet they fit in the ylim range.
2008 Aug 12
1
converting rgb() output to 0-255
Hi, I have three matrices, Red, Green and Blue. I would like to produce a matrix which is the combined values of Red, Green and Blue matrices. I know rgb() does the job, but the values are not between 0-255, they are in the following format: "#2C312C" I would like to have the values between 0-255. I wonder if you could tell me what I can do... Thanks for your help, Rostam
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
2016 Apr 16
5
Mean of hexadecimal numbers
Hi, How would you calculate the "mean colour" of several colours, for example c("#FF7C00","#00BF40","#FFFF00")? Yours, Atte Tenkanen
2015 May 31
2
Etiquetas en gráfico de dispersión
Buenas tardes, Tengo un gráfico de dispersión y quiero indicar cada punto a qué individuo corresponde. ¿Cómo añado estas etiquetas de datos? El código es: res<-cmdscale(fst,k=2) plot(res[,1],res[,2],lwd=2,xlab="x",ylab="y") abline(h=0,v=0,col="blue") Muchas gracias, Gemma [[alternative HTML version deleted]]
2013 Jun 07
1
col2rgb, factors & documentation
Hello Core Folk. Quite by accident I discovered today that col2rgb, when fed factors, acts on the integer representation of those factors: td <- as.factor(rainbow(5)) # not how I discovered the issue! td res <- col2rgb(td) res # but col2rgb("#FF0000FF") # this is td[1] but does not produce the same answer res[,1] # moreover as.integer(td) col2rgb(5) # the integer value of the
2002 Jul 21
3
boxplot(): formating median in another linethickness?
Dear guRus, I want to do some boxplots, but the median sould appear in another line-thickness and another color. I do not know, what to do in order to realise my wishes. Sorry for that question, but I am new to R. cheers steph -- Linux: the operating system with a CLUE... Command Line User Environment. -------------------------------------- Stephan Holl GnuPG Key-ID: 11946A09 ICQ#
2023 Jul 23
2
col2rgb() function
Hello I have a palette vector of colour blind colours (in hexadecimal) which I?m using for plots, but they are not see-through, and as I wanted to overlay some histograms I wanted to convert these colours to rgb, when you can set the opacity. I have found the function col2rgb(), which works in the sense that it gives a vector of numbers but these don?t work directly in rgb because they are too
2023 Jul 23
2
col2rgb() function
Thanks That works nicely Nick On Sun, 23 Jul 2023 at 19:26, Ben Bolker <bbolker at gmail.com> wrote: > Does adjustcolor() help? > > cb8<- c("#000000", "#E69F00", "#56B4E9", "#009E73","#F0E442", "#0072B2", > "#D55E00", "#CC79A7") > plot(0,0,xlim=c(1,8),ylim=c(0,1)) >