similar to: hsv2rgb in R

Displaying 20 results from an estimated 3000 matches similar to: "hsv2rgb in R"

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
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
2000 Mar 29
1
pre summary: mapping of colornames into hsv?
Hi Martin, Great that you follow this. My original intention was to be able to translate colornames to hsv because this would allow using colornames to cut out a certain part of the colorwheel for colorcoding (HSV component H, see my code below) I think internally we might have colors represented as Colornames, ColorIntegers, ColorHexcodes, ColorRGBs, ColorHSVs (ColorCMYs?) however the R-user
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
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
2004 Oct 17
1
FW: Plotcorr: colour the ellipses to emphasize the differences
-----Original Message----- From: Duncan Murdoch [mailto:murdoch at stats.uwo.ca] Sent: ned 2004-10-17 15:34 To: Gorjanc Gregor Cc: r-help at stat.math.ethz.ch Subject: Re: [R] Plotcorr: colour the ellipses to emphasize the differences On Sun, 17 Oct 2004 02:51:58 +0200, "Gorjanc Gregor" <Gregor.Gorjanc at bfro.uni-lj.si> wrote: [removed old stuff] >>I would also like to
2005 Jul 07
2
Brewer colours
Anyone who is interested in using optimal colour palettes should look at the work of Cindy Brewer: www.colorbrewer.org I have written code to use her colour schemes in R. It is included below. Perhaps someone may find this interesting enough to work into a package. Included also is a function showpalette, which was posted here a while back. I don't remember who wrote it. I have copied all
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
2010 Jan 28
2
color palette for points, lines, text / interactive Rcolorpicker?
I'm looking for a scheme to generate a default color palette for plotting points, lines and text (on a white or transparent background) with from 2 to say 9 colors with the following constraints: - "red" is reserved for another purpose - colors should be highly distinct - avoid light colors (like "yellow"s) In RColorBrewer, most of the schemes are designed for area fill
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
2004 Oct 07
3
How to use alpha transparency channel for colors?
The release notes for R 2.0.0 states: It is now possible to specify colours with a full alpha transparency channel via the new 'alpha' argument to the rgb() and hsv() functions, or as a string of the form "#RRGGBBAA". NOTE: most devices draw nothing if a colour is not opaque, but PDF and Quartz devices will render semitransparent colours. A new argument
2003 Dec 09
1
arni.colors
Dear r-devel, I have implemented a function to create color palettes with improved contrast and logical order, compared with the built-in ones: source("arni.colors.R") # code is given below barplot(rep(1,100), col=arni.colors(100), space=0, border=0, axes=F) par(mfrow=c(2,1)) # rainbow() has too much green... barplot(rep(1,50), col=rev(rainbow(50,end=0.7)), space=0, border=0,
2002 Jul 16
2
r-square for non-linear regression
We have extracted parameters from physiological measurements by fitting SSlogis-like curves with nlsList and nlme. We presented residuals plot in a paper, but a referee argues that these cannot be included (too technical), and r-square values should be given instead to compare the goodness of fit with those of other authors. I remember that 30 years ago in my stat 101, I learned that r-square is
2009 Oct 13
2
General means of matching a color specification to an official R color name
Hello List Dwellers: I?ve looked around quite a bit, but don?t quite see an answer that I understand. I?m looking for a way to take any kind of color specification (rgb, hsv, hcl, hex) and match it to the n-nearest R official color names. Clearly it is easy to interconvert different specification schemes and color spaces, but matching to the name seems a bit trickier. Seems like if one has a
2005 Dec 13
4
Ploting graphics using X tints from a color
Hi, I'm trying to draw a 2D plot using multiple tints of red. The (simplified) setup is the following: || year | x | y || My idea is that each year is plotted with a different tint of red. Older year (lightest) -> Later year (darkest). I've managed to plot this with different scales of grays simply by doing: palette(gray(length(years):0/length(years))) before the plot and for each
2006 Mar 25
7
Regexp subexpression
I can't get the PERL subexpression translated to R. Following, for example, B. Ripley's http://finzi.psych.upenn.edu/R/Rhelp02a/archive/58984.html I am using sub, but it looks like an ugly substitute. Assume I want to extract the first alpha part and the first numeric part, but only if they are in sequence. Do I really have to use the sub twice, first extracting the first variable, then
2009 Apr 06
6
Need help in calculating studentized residuals/leverage values of non-linear model [nls()]
Hi there, I hope I can get advice regarding the calculation of leverage values or studentized residual values of a non-linear regression model. It seems like rstudent() does not work on a nls object. Many thanks in advance! Best regards, Xingli
2010 Mar 20
5
Problem specifying Gamma distribution in lme4/glmer
Dear R and lme4 users- I am trying to fit a mixed-effects model, with the glmer function in lme4, to right-skewed, zero-inflated, non-normal data representing understory grass and forb biomass (continuous) as a function of tree density (indicated by leaf-area). Thus, I have tried to specify a Gamma distribution with a log-link function but consistently receive an error as follows: >
2002 Sep 15
1
lattice with print(..., more=) and multiple graphics files
Under platform i586-pc-linux-gnu arch i586 os linux-gnu system i586, linux-gnu status major 1 minor 5.0 year 2002 month 04 day 29 language R (haven't updated to 1.5.1 because it's not available on Mandrake 8.1 which is on my
2009 Sep 30
5
Condition to factor (easy to remember)
Dear List, creating factors in a given non-default orders is notoriously difficult to explain in a course. Students love the ifelse construct given below most, but I remember some comment from Martin M?chler (?) that ifelse should be banned from courses. Any better idea? Not necessarily short, easy to remember is important. Dieter data = c(1,7,10,50,70) levs =