Java Mailing List Archive

http://www.junlu.com/

Subjects
Home
mod jk2 https
Donation of JAXP 1 3 Sources to Apache
R annoyances
RE: Finding out when the aspnet admin worker process has recycled
Favorite Linux Distribution
eigenvalues of a circulant matrix
Apache Install
Reachin apache from outside
Ant should have an ext directory
Warning: Documentroot doesn 't exist
Can this be Done?
RE: Multilanguage Application
RE: Simple Question On setting up Sub Domain site
Lack of independence in anova()
How to close connection instead of sending 403?
winning the case for ANT
Re: adding php
New Ant GUI 'Ant 's Nest '
Narrowing Down A Strange Problem
Ant Task: sshexec
R Graph Gallery : categorization of the graphs
I 've been hacked, I need some help please
RE: Anyone working with DotNetNuke?
RE: Exception Handling Opinion
hex format
RE: IIS stopped working :(
<for > Build Failed:problem
RE: Separation of Objects from Logic
RE: Tracking pages with long request execution time
sending email to multiple destination
Web Site
ant UI
Easy cut & paste from Excel to R?
Win32 Apache Restart
Improving Tasks
HELP! PLEASE!
RE: Adding Controls to a Page
read table
RE: ASPNET account doesn 't exist!
Best way to uninstall Apache2 on red hat
from win to linux how to web page
XMLParseException changes and creation of XMLLocator2
Re Post: rewrite backslash to forward slash
Target or macrodef?
Page display problem XPSP2
Authentication problems
Dynamic Dictionary Data Type?
Newbie unable access my www from outside
off topic question: Latex and R in industries
Conflict between xtable and Hmisc when using Sweave?
Very old problem without any new solution
mod rewrite help
Basic Authentication question
RE: Code Security
calling ant from java program
prevent double signing
Re: Controlling Copy/Paste/Print
Using R to illustrate the Central Limit Theorem
web server slow too much slow
access to user directories
Links
Home
Official R Project Site
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
hex format

hex format

2005-04-07       - By Earl F. Glynn
Reply:     <<     11     12     13     14     15     16     17     18     19     20     >>  

"Thomas Lumley" <tlumley@(protected)> wrote in message
news:Pine.A41.4.61b.0504071034420.346778@(protected)
> The convertColor function in R 2.1.0 provides colorspace conversion,
> including "hex".

> #ff0080 isn't a number, it's a colour (or perhaps a color). If it were
> converted to numeric form it would be a vector of three numbers, and which
> three numbers would depend on the coordinate system used for colour space.

Colo(u)rs and numbers are interchangeable to me.  When you look at a
picture, don't you "see" numbers?

Maybe you don't see a number here, but I do. #ff0080 is interpreted in some
(non-R) contexts as a single number.  In many contexts, including HTML,
colors are represented as three bytes in hex with this notation and the "#"
means "hexadecimal".  The RGB color componets can be discerned quite easily:
hex FF is decimal 255 (red), hex 00 is decimal 0 (green), hex 80 is decimal
128 (blue).  Some programs, e.g., Dreamweaver, allow specification of colors
in this hex 3-byte form directly.  The "16 million" colors you seen on a
"true color" display are from the 256*256*256 (or in hex FF*FF*FF) possible
RGB triples.

> For example, R already provides both hsv() and rgb() to create colours
> from vectors of three numbers, but the correspondence is different in each
> case.

Sorry if some consider this off topic:
HSV as a color space is really only liked by computer scientists.  Image
processing and color engineers rarely if ever use HSV.

There are MANY other color spaces and computations possible (see "color
spaces" or "color conversions" or other color topics on  this page
http://www.efg2.com/Lab/Library/Color/Science.htm).  Most of these color
manipulations in R are not easy because the very first step, converting
colors, I mean numbers <g>, like #ff0080 to the red, green components is
hindered because one must reinvent the wheel of hex-to-decimal conversion.

Perhaps R will someday introduce a "pixel" type that would encapsulate the
three color components (for color images at least).  A matrix of pixels
could easily be made into an image.  Some color computations such a Maxwell
Triangle, or a CIE Chromaticity Chart (sorry the links are currently broken,
but the image can be seen on this Chinese translation page)
http://bluemoon.myrice.com/efg/color/chromaticity.htm in R is more difficult
than it should be because of how R is designed now.  Many image processing
statistical problems could be tackled directly in R if there were an easier
way to manipulate pixels and images.

But the hex manipulations I'm advocating could be used for variety of other
purposes.  E.g, I must periodically deal with a binary data stream of flow
cytometery data -- part ASCII, part binary.  Reading this stream directly
from R would be nice and is almost doable.  Working with raw data and
understanding  exactly what you've got would be facilitated by better
conversion capabilities within R.

efg

______________________________________________
R-help@(protected) mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

©2008 junlu.com - Jax Systems, LLC, U.S.A.