Wednesday July 21, 2010

I have TMI about Color!

But it is illuminating, and appearenly lots of the color names in rgb.txt are supported in CSS. The gotcha is probably in what colors in the standard are NOTavailable to the browser. I have firefox 3.0 .

One of the color name mismatches between X11 rgb and CSS is purple. The purple in the CSS is darker than the purple in X11. Now xterm uses a different color list, different RGB, values than in /etc/X11/rgb.txt. There is a good reason. It is that terminals, meaning color glass ttys supported different colors than more modern RGB terminals and LCD dislays. I am going to try to set the text color to the purple available to this browser via CSS. It looks like the darker of the two.

Finally I want to set the background to a lavender or light purple using a color name and see if many color names are supported. I chose lavender, which worked.

Another Issue is minimal HTML

I already know that the browser will supply miminal boilerplate to this minimal code. I use style in the head element applied to the body element. What I think I will try is to set the text color in a head element but not code an explicit body element and see if the style gets applied. If I have to code the head and body elements to tell the browser to use more than its minimal defaults, the last thing to find is if I also need to code the html element. It did render this minimal HTML with the default style, on seamonkey, not firefox, since that is the browser emacs is coded to use.

It did what I hoped. I didn't need the body or html elements even though I coded a style setting for the body, which is implied. This may not be very portable, but I exepct that if I go look at the document source displayed from the browser the missing elements are these. Technically, I must use a DOCTYPE with a legal data definition document. to be standard compliant.

Seamonkey did not display the implied elements in its document source display

Free Web Hosting