472,372 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,372 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 5128
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 vo. 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: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

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.