472,146 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

What's with three letter colours now?

as opposed to six letter colours?

I'm seeing body {color: #fff; background: #000;} and stuff lately.
Is this a new form of abbreviation?

BB
--
www.kruse.co.uk SE*@kruse.demon.co.uk
home of SEO that's shiny!
--
Jul 21 '05 #1
12 15950
* Big Bill wrote in comp.infosystems.www.authoring.stylesheets:
I'm seeing body {color: #fff; background: #000;} and stuff lately.
Is this a new form of abbreviation?


http://www.w3.org/TR/CSS1#color-units
http://www.w3.org/TR/CSS2/syndata.html#color-units
http://www.w3.org/TR/CSS21/syndata.html#color-units
http://www.w3.org/TR/css3-color/#numerical
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Jul 21 '05 #2
Big Bill wrote:
as opposed to six letter colours?

I'm seeing body {color: #fff; background: #000;} and stuff lately.
Is this a new form of abbreviation?


New? Hasn't it always been part of the css specification?
Jul 21 '05 #3
Paul wrote:
Big Bill wrote:
as opposed to six letter colours?

I'm seeing body {color: #fff; background: #000;} and stuff lately. Is
this a new form of abbreviation?


New? Hasn't it always been part of the css specification?


Part of the HTML spec too. But beware: some old browsers can't handle
the 3-digit colours.

Jul 21 '05 #4
* C A Upsdell wrote in comp.infosystems.www.authoring.stylesheets:
I'm seeing body {color: #fff; background: #000;} and stuff lately. Is
this a new form of abbreviation?


New? Hasn't it always been part of the css specification?


Part of the HTML spec too. But beware: some old browsers can't handle
the 3-digit colours.


Which HTML spec (and according to which section in that spec?)
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Jul 21 '05 #5
Bjoern Hoehrmann wrote:
* C A Upsdell wrote in comp.infosystems.www.authoring.stylesheets:
I'm seeing body {color: #fff; background: #000;} and stuff lately. Is
this a new form of abbreviation?

New? Hasn't it always been part of the css specification?


Part of the HTML spec too. But beware: some old browsers can't handle
the 3-digit colours.

Which HTML spec (and according to which section in that spec?)


Y'know, I took a look at both the HTML 4.01 and CSS 2 specs. The HTML
spec says nothing about the length of a hex colour code; the CSS spec
says that the code can be either 3 or 6 digits. So I'm not sure what
this means: does this mean that the HTML spec can take colour codes of
indefinite length: I could find nothing in the spec to either affirm or
refute this.

Jul 21 '05 #6
"Big Bill" wrote in comp.infosystems.www.authoring.stylesheets:
as opposed to six letter colours?

I'm seeing body {color: #fff; background: #000;} and stuff lately.
Is this a new form of abbreviation?


Yes, it was introduced only about ten years ago. :-)

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Jul 21 '05 #7
"C A Upsdell" wrote in comp.infosystems.www.authoring.stylesheets:
But beware: some old browsers can't handle
the 3-digit colours.


Which?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Jul 21 '05 #8
* C A Upsdell wrote in comp.infosystems.www.authoring.stylesheets:
Part of the HTML spec too. But beware: some old browsers can't handle
the 3-digit colours.


Which HTML spec (and according to which section in that spec?)


Y'know, I took a look at both the HTML 4.01 and CSS 2 specs. The HTML
spec says nothing about the length of a hex colour code; the CSS spec
says that the code can be either 3 or 6 digits. So I'm not sure what
this means: does this mean that the HTML spec can take colour codes of
indefinite length: I could find nothing in the spec to either affirm or
refute this.


It means it is not defined... Please write to ww*************@w3.org to
report errors in the HTML/XHTML specifications.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Jul 21 '05 #9
C A Upsdell > wrote:
<snip>

Y'know, I took a look at both the HTML 4.01 and CSS 2 specs. The HTML
spec says nothing about the length of a hex colour code; the CSS spec
says that the code can be either 3 or 6 digits.
http://www.w3.org/TR/1999/REC-html40...tml#type-color

So I'm not sure what this means: does this mean that the HTML spec can take colour codes of
indefinite length: I could find nothing in the spec to either affirm or
refute this.


"A color value may either be a hexadecimal number (prefixed by a hash
mark) or one of the following sixteen color names."

So if 3-digit codes work in html, it is a browser "feature". Since the
color attribute is being deprecated this discussion is irrelevant.

Paul
Jul 21 '05 #10
On Wed, 29 Dec 2004 20:37:36 -0500, Stan Brown
<th************@fastmail.fm> wrote:
"Big Bill" wrote in comp.infosystems.www.authoring.stylesheets:
as opposed to six letter colours?

I'm seeing body {color: #fff; background: #000;} and stuff lately.
Is this a new form of abbreviation?


Yes, it was introduced only about ten years ago. :-)


Well I can't keep up with everything!
I ask as only a day or so ago I saw it for the firest time and as luck
would have it saw it twice.

BB
--
www.kruse.co.uk SE*@kruse.demon.co.uk
home of SEO that's shiny!
--
Jul 21 '05 #11
On Thu, 30 Dec 2004 03:03:49 +0100, Bjoern Hoehrmann
<bj****@hoehrmann.de> wrote:
* C A Upsdell wrote in comp.infosystems.www.authoring.stylesheets:
Part of the HTML spec too. But beware: some old browsers can't handle
the 3-digit colours. Which HTML spec (and according to which section in that spec?)
Y'know, I took a look at both the HTML 4.01 and CSS 2 specs. The HTML
spec says nothing about the length of a hex colour code; the CSS spec
says that the code can be either 3 or 6 digits. So I'm not sure what
this means:...
It means it is not defined... Please write to ww*************@w3.org to
report errors in the HTML/XHTML specifications.


And since when is a "color" information of interest in a markup
language?

--
Rex
Jul 21 '05 #12
JRS: In article <ud********************************@4ax.com>, dated
Wed, 29 Dec 2004 23:34:32, seen in news:comp.infosystems.www.authoring.s
tylesheets, Big Bill <kr***@cityscape.co.uk> posted :
Subject: What's with three letter colours now? as opposed to six letter colours?

I'm seeing body {color: #fff; background: #000;} and stuff lately.
Is this a new form of abbreviation?

(1) The body of a News article should be related to, but not dependent
on, the Subject line.

(2) I note that others have, while being keen to score points, not
provided an explanation. So see

Cascading Style Sheets, level 1
W3C Recommendation 17 Dec 1996
http://www.w3.org/pub/WWW/TR/REC-CSS1

which includes :-

6.3 Color units

...

The format of an RGB value in hexadecimal notation is a '#' immediately
followed by either three or six hexadecimal characters. The three-digit
RGB notation (#rgb) is converted into six-digit form (#rrggbb) by
replicating digits, not by adding zeros. For example, #fb0 expands to
#ffbb00. This makes sure that white (#ffffff) can be specified with the
short notation (#fff) and removes any dependencies on the color depth of
the display.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 21 '05 #13

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

86 posts views Thread by Michael Kalina | last post: by
8 posts views Thread by Doug Laidlaw | last post: by
4 posts views Thread by Tim Marshall | last post: by
4 posts views Thread by Harro de Jong | last post: by
31 posts views Thread by anon856525 | last post: by
5 posts views Thread by Jameson | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.