Hi, Is it possible to find corresponding color code in R for the following RGB (R185, G35 & B80)? Thanks in advance. Best regards, Ezhil
A Ezhil wrote:> Hi, > > Is it possible to find corresponding color code in R > for the following RGB (R185, G35 & B80)? > > Thanks in advance. > > Best regards, > Ezhil >How about: x <- c(185, 35, 80) class(x) <- "hexmode" paste("#", paste(format(x), collapse = ""), sep = "") [1] "#b92350" I found this using help.search("hex") which led to ?format.hexmode. HTH, --sundar
Well, rgb(185, 35, 80, max=255) seems like a good place to start. help.search("rgb") turns up all kinds of color-related functions. Sarah On 6/26/06, A Ezhil <ezhil02 at yahoo.com> wrote:> Hi, > > Is it possible to find corresponding color code in R > for the following RGB (R185, G35 & B80)? > > Thanks in advance. > > Best regards, > Ezhil >-- Sarah Goslee
> ?rgbYou will need to divide your values by the maximum or specify it, as in > rgb(185, 35, 80, max=255) on 6/26/2006 12:17 PM A Ezhil said the following:> Is it possible to find corresponding color code in R > for the following RGB (R185, G35 & B80)? > >-- Michael Prager, Ph.D. Southeast Fisheries Science Center NOAA Center for Coastal Fisheries and Habitat Research Beaufort, North Carolina 28516 ** Opinions expressed are personal, not official. No ** official endorsement of any product is made or implied.
You can use the following:> rgb(185, 35, 80, max=255)Which gives "#B92350" Or if you want a color name, the closest I found is "maroon" which is red: 176, green: 48, blue: 96 Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at intermountainmail.org (801) 408-8111 -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of A Ezhil Sent: Monday, June 26, 2006 10:17 AM To: R-help at stat.math.ethz.ch Subject: [R] Finding a color code. Hi, Is it possible to find corresponding color code in R for the following RGB (R185, G35 & B80)? Thanks in advance. Best regards, Ezhil ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
A Ezhil wrote:> Hi, > > Is it possible to find corresponding color code in R > for the following RGB (R185, G35 & B80)?rgb(185, 35, 80, max=255) [1] "#B92350" ?rgb> Thanks in advance. > > Best regards, > Ezhil > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html >-- Chuck Cleland, Ph.D. NDRI, Inc. 71 West 23rd Street, 8th floor New York, NY 10010 tel: (212) 845-4495 (Tu, Th) tel: (732) 512-0171 (M, W, F) fax: (917) 438-0894
Hi Greg, Thank you very much for your response. It works. Thanks also for Michael,Sarah & Sundar. Best regards, Ezhil --- Greg Snow <Greg.Snow at intermountainmail.org> wrote:> You can use the following: > > > rgb(185, 35, 80, max=255) > > Which gives "#B92350" > > Or if you want a color name, the closest I found is > "maroon" which is > red: 176, green: 48, blue: 96 > > Hope this helps, > > > -- > Gregory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.snow at intermountainmail.org > (801) 408-8111 > > > -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf > Of A Ezhil > Sent: Monday, June 26, 2006 10:17 AM > To: R-help at stat.math.ethz.ch > Subject: [R] Finding a color code. > > Hi, > > Is it possible to find corresponding color code in R > for the following > RGB (R185, G35 & B80)? > > Thanks in advance. > > Best regards, > Ezhil > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >