[Seqinr-commits] r1633 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 3 10:49:38 CEST 2009


Author: lobry
Date: 2009-09-03 10:49:37 +0200 (Thu, 03 Sep 2009)
New Revision: 1633

Added:
   pkg/R/col2alpha.R
Log:
 

Added: pkg/R/col2alpha.R
===================================================================
--- pkg/R/col2alpha.R	                        (rev 0)
+++ pkg/R/col2alpha.R	2009-09-03 08:49:37 UTC (rev 1633)
@@ -0,0 +1,4 @@
+col2alpha <- function(color, alpha = 0.5){
+  x <- col2rgb(color)[,1]
+  rgb(x[1], x[2], x[3], 255*alpha, maxColorValue = 255)
+}



More information about the Seqinr-commits mailing list