Illegal color names such as "ligtblue" should be ignored




CSS Parsing and Computation
16 years ago
15 years ago


(Reporter: jbebel, Assigned: dbaron)


Windows XP

Firefox Tracking Flags

(Not tracked)



(2 attachments)



16 years ago
I know very little about HTML, but there is a page I use that has a "ligtblue"
background, which shows up black in mozilla.  I'm not sure if this is a problem,
but it might be nice for it to show up like "lightblue" instead of black. Even
white might be better.

Comment 1

16 years ago
Please provide the URL to the page in question

Comment 2

16 years ago
Mac OS 9.1. Build 2002082808

ligtblue is recognized by NS4, but it is not lightblue. I am creating a testcase

Comment 3

16 years ago
Created attachment 97068 [details]
Testcase for lightblue and ligtblue

Comment 4

16 years ago
Created attachment 97069 [details]
Resutl of the testcase with Mozilla an Netscape

(Done on a Mac)

Comment 5

16 years ago
My results were similar on windows XP.  Also checked IE 6, similar to Netscape.

Comment 6

16 years ago
> there is a page I use that has a "ligtblue" background

Which one?

Comment 7

16 years ago
The page was private, so it would be pointless to say where.  However, the test
case attachment from Jean-Pierre Melkonian provides the same results.  Look at it.

Comment 8

16 years ago
MSIE6 shows the same shade of blue as old Netscape 4* does.
However: Change the color-name to "liftblue" - and you get the same result.

Seems Netscape 4 and MSIE makes the best of what they interpret as some
"incomprehensible" variant of "blue". I agree that Mozilla's choise of black in
this case isn't as good an alternative.

Comment 9

16 years ago
Google search result: ligtblue (many hits), ligtgreen (4), ligtpink (2),
ligtcoral (1), ligtsteelblue (1), ligtyellow (1), other colours (none)

for some reason, ligtblue is the only colour infected
Summary: ligtblue as alternate spelling of lightblue → guess color value [ligtblue as alternate spelling of lightblue]
I agree that making it black is a bug, an invalid color name should be ignored.
IMO, these are the (only) color names Mozilla should recognise:
Thanks for the link. I found nothing with the google search on

Comment 12

16 years ago
-> layout

bug 4434 is somewhat related: invalid bacground colors were once made white
instead of black, which likely improved readability since text more often is black.

Judging by comments there, there are probably other colors too that should be
"guesstimated" when spelled partly wrong.
Assignee: asa → attinasi
Component: Browser-General → Layout
QA Contact: asa → petersen
Nothing should be "guesstimated" here. It would only lead to incompatibilities
between vendors, platforms etc.

Illegal color names should be ignored, just as Troy said in bug 4434 comment 1.

IMO, the current Working Draft of "CSS3 module: Color" is what Moz should use:

-->Style System
Assignee: attinasi → dbaron
Component: Layout → Style System
Ever confirmed: true
QA Contact: petersen → ian
Summary: guess color value [ligtblue as alternate spelling of lightblue] → Illegal color names such as "ligtblue" should be ignored
Nothing is being "guesstimated".

"ligtblue" is parsed as "0000b00e0" == #00b0e0 by NS4 and IE.

It is parsed as "0000b00e0" == #000b0e by Mozilla.

And this is a dup.

None of this applies to CSS in standards mode, so CSS3 is not really applicable...

*** This bug has been marked as a duplicate of 121738 ***
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE

Comment 15

16 years ago
Mozilla replace ALL colornames it can't interpret with something that looks
black to me. That is the problem in this bug: Which color to use for replacement.
While NS4 and MSIE always display a medium toned color of some sort in these
cases, Mozilla will always display them as near black - and eventual text
becomes unreadable in most cases.

Opera does it differently: It will use white instead - which is a better choise
IMO, and the same as the fix in bug 4434. I believe this bug should be reopened
and summary changed to that of bug 4434. Or bug 4434 be re-opened if you prefer.
> Mozilla replace ALL colornames it can't interpret with something that looks
> black to me.

Try "figtblue"

Bug 121738 describes what's happening in a good deal of detail...

Comment 17

16 years ago
I suppose it makes sense to take the first two bytes of each block, as mozilla
does, but why did netscape and IE take the second and third?  And is using as a
string of 9 hex digits an official way of writing colors?  It seems odd, and
wasteful even if 1/3 of the digits will be ignored.
It's not "official"...

And the reason we take those two is that that's what we happen to do.  The code
is really designed to work with strings of 6 or fewer digits...

I tried to "fix" it (in bug 121738) and it didn't quite work; just taking a
different set of digits made the chrome look all weird for some reason...
You need to log in before you can comment on or make changes to this bug.