473,320 Members | 2,083 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Why does background colour and font colour change when you change the windows settings?

Hi
I have written an HTML pages which does not have any colour specifying
tags as far I know. When I view this in an Microsoft internet
explorer browser it appears with a white background and black text but
when I change
Windows start menu->settings->control panel ->display -> appearance
and change scheme to 'High Contrast Black' the background in the
browser changes to black and the text to white.
I understand that the windows scheme specifies the font and background
colours but does any one know how the IE browser picks this up? Also
is there any way of detecting the scheme change so that for instance
if the scheme chosen by the user is High contract Black I can change
my text to purple for instance?

thanks,
L
Jul 20 '05 #1
6 5210
Louise wrote:
<cut />
I understand that the windows scheme specifies the font and background
colours but does any one know how the IE browser picks this up? Also
is there any way of detecting the scheme change so that for instance
if the scheme chosen by the user is High contract Black I can change
my text to purple for instance?


If a user has set their OS to use a certain colour scheme, particularly
an accessible one, shouldn't you be respecting their preference rather
than trying to override it?

If you've followed this W3C tip: http://www.w3.org/QA/Tips/color then
you shouldn't have to worry about a users OS/browser preferences making
some of your text disappear into any background colours.
--
Andrew Urquhart
- Reply: www.andrewu.co.uk/contact/
Jul 20 '05 #2
Els
Louise wrote:
Hi
I have written an HTML pages which does not have any colour specifying
tags as far I know. When I view this in an Microsoft internet
explorer browser it appears with a white background and black text but
when I change
Windows start menu->settings->control panel ->display -> appearance
and change scheme to 'High Contrast Black' the background in the
browser changes to black and the text to white.
I understand that the windows scheme specifies the font and background
colours but does any one know how the IE browser picks this up?
Haven't tried it, but I think most browsers pick it up. As
they also do pick up different widths for the scrollbar.
Also
is there any way of detecting the scheme change so that for instance
if the scheme chosen by the user is High contract Black I can change
my text to purple for instance?


I hope not.
If my eyesight would be so bad that I _need_ high contrast
black, I'd be real disappointed if the letters were purple
against this black background.

--
Els

Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -

Jul 20 '05 #3
lo**********@hotmail.com (Louise) wrote:
I have written an HTML pages which does not have any colour specifying
tags as far I know. When I view this in an Microsoft internet
explorer browser it appears with a white background and black text but
when I change
Windows start menu->settings->control panel ->display -> appearance
and change scheme to 'High Contrast Black' the background in the
browser changes to black and the text to white.
I understand that the windows scheme specifies the font and background
colours but does any one know how the IE browser picks this up?
Because IE is part on Windows. Actually that's not the full answer as
NN4 also uses the Windows colour scheme, whilst Opera and NN7 don't.

But surely it makes sense for a Windows application to use the colour
scheme defined in the Windows settings? If the user has picked a hgh
contrast colour scheme then presumably they have good reason for doing
so and applications should respect that.
Also
is there any way of detecting the scheme change so that for instance
if the scheme chosen by the user is High contract Black I can change
my text to purple for instance?


Purple on black? Is that a good idea?

No, there's no way of detecting which Windows colour scheme is in use.

With some JavaScript you can find inidividual colours in use, e.g. teh
following returns the current body text colour in IE5+, NN6.1+ and
Opaer 7+. The only problem being that IE returns the colour in the
format #000000 whilst Opera and Gecko return it like rgb(0, 0, 0).

var pageColor;
if (document.body.currentStyle) {
pageColor = document.body.currentStyle.color;
} else if (document.defaultView &&
document.defaultView.getComputedStyle(document.bod y,"")){
pageColor =
document.defaultView.getComputedStyle(document.bod y,"").getPropertyValue("color");
}

I'm sure a JavaScript guru copuld improve the code somewhat.
And of course normal caveats about JavaScript not being available to
all users apply.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #4
On Thu, 01 Apr 2004 12:50:40 +0100, Steve Pugh <st***@pugh.net> wrote:
lo**********@hotmail.com (Louise) wrote:


...
Also
is there any way of detecting the scheme change so that for instance
if the scheme chosen by the user is High contract Black I can change
my text to purple for instance?


Purple on black? Is that a good idea?

No, there's no way of detecting which Windows colour scheme is in use.


The tradional answer to such worries is: always specify text color and
background color together in the same place.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #5
thanks for your responses, maybe I should explain my problem in a bit
more detail:
The problem is that I am using JavaHelp and the imbedded HTML viewer
does not seem to respect the Windows colour scheme, so my text
disappears.

I was trying to see if there was a way round this by understanding
more clearly how an IE browser or other picks up the colour scheme.

If any one has any advice on this that would be great, otherwise I am
going to have to have two sets of help files or style sheets!

thanks
L
Jul 20 '05 #6
thanks for your responses.
The problem is that I am using JavaHelp and the imbedded HTML viewer
does not seem to respect the Windows colour scheme, so my text
disappears.

I was trying to see if there was a way round this by understanding
more clearly how and IE browser or other picks up the colour scheme.

If any one has any advice on this that would be great, otherwise I am
going to have to have two sets of help files or style sheets!

thanks
L

Steve Pugh <st***@pugh.net> wrote in message news:<0f********************************@4ax.com>. ..
lo**********@hotmail.com (Louise) wrote:
I have written an HTML pages which does not have any colour specifying
tags as far I know. When I view this in an Microsoft internet
explorer browser it appears with a white background and black text but
when I change
Windows start menu->settings->control panel ->display -> appearance
and change scheme to 'High Contrast Black' the background in the
browser changes to black and the text to white.
I understand that the windows scheme specifies the font and background
colours but does any one know how the IE browser picks this up?


Because IE is part on Windows. Actually that's not the full answer as
NN4 also uses the Windows colour scheme, whilst Opera and NN7 don't.

But surely it makes sense for a Windows application to use the colour
scheme defined in the Windows settings? If the user has picked a hgh
contrast colour scheme then presumably they have good reason for doing
so and applications should respect that.
Also
is there any way of detecting the scheme change so that for instance
if the scheme chosen by the user is High contract Black I can change
my text to purple for instance?


Purple on black? Is that a good idea?

No, there's no way of detecting which Windows colour scheme is in use.

With some JavaScript you can find inidividual colours in use, e.g. teh
following returns the current body text colour in IE5+, NN6.1+ and
Opaer 7+. The only problem being that IE returns the colour in the
format #000000 whilst Opera and Gecko return it like rgb(0, 0, 0).

var pageColor;
if (document.body.currentStyle) {
pageColor = document.body.currentStyle.color;
} else if (document.defaultView &&
document.defaultView.getComputedStyle(document.bod y,"")){
pageColor =
document.defaultView.getComputedStyle(document.bod y,"").getPropertyValue("color");
}

I'm sure a JavaScript guru copuld improve the code somewhat.
And of course normal caveats about JavaScript not being available to
all users apply.

Steve

Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Stephen Ferg | last post by:
I have a question that is not directly Python-related. But I thought I'd ask the most erudite group that I know... :-) When did Windows start accepting the forward slash as a path separator...
1
by: Tull Clancey | last post by:
Hi All. I want to be able to change the font colour of certain rows in a Net.Datagird. The data source is a manually created data table within a set. I can format all the columns just the...
2
by: libsfan01 | last post by:
How/can you do this? kind regards marc rice
7
by: Xah Lee | last post by:
Look at this page http://xahlee.org/emacs/wrap-url.html Look at it in Firebox, look at it in Safari, in Opera, and look at it in Microsoft Internet Explorer. The only fucked up case, is...
3
by: Johny | last post by:
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the...
0
by: Johny | last post by:
I use PIL to write some text to a picture.The text must be seen wery clearly. I write the text to different pictures but to the same position. As pictures maybe different, colour, in the...
4
by: gaya3 | last post by:
Hi all, In my program, i have like <td> <a href=url1> link1</a> <a href=url2> link2</a> <a href=url3> link3</a> </td> problem is i have to change the font colour of...
3
by: DNolan | last post by:
Hello, I was wondering if anyone could help me. I have an access form with tabbed pages on it. I would like the colour of the tab name to change when a user inputs information into the fields on...
5
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
This code works fine in Windows Application. In Windows Application, I am able to zip the image files properly and it totally contains 900MB My problem is the same code which I used in my Windows...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.