• 0

Question only for the Pro's


Question

Does anyone know if it is possible from CSS or through some other method to reference the colours specified in the system colour scheme (eg. visual style as seen under the appearance tab) .. sometimes referred to as the windows colour palette. Is this possible?

I would like to create a standalone application that runs using a server side language (most likely Coldfusion) that has an interface that matches the users current windows environment as closely as possible. So I will need to grab things like the background colour of the users 'File - Edit - View' etc. menu so it will match their windows theme.

I could very easily be trying to achieve the impossible here, but your feedback on this will be grateful.

envision

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0

I'd guess you're trying to reach the impossible. CSS was built as a web technology and therefore cross-platform. I don't think it would be possible to reference the system colors of one OS, unless Microsoft has added color definitions in IE (and then they wouldn't work in Firefox, Opera, and other browsers).

Link to comment
Share on other sites

  • 0

Thats true! But knowing that my user base are all on XP workstations running IE 6 and nothing else allows me to forget about compatability.. for once, which is nice :)

CSS can be ruled out for sure. But what about implementation through Javascript.. can some API call give me this information.

I do think I am really reaching on this, but I was just very sure I had seen it done somewhere.

Link to comment
Share on other sites

  • 0
I know it's possible with CSS.

I will find the code.......

585027988[/snapback]

If you can do that, you deserve one hell of pat on the back sir :D

Yes, I am developing a standalone application so far as the perception of it is that it looks like any normal application you run from a shortcut on the desktop. But it will be an intranet web application. This is for a very specific project and this approach will allow for a great many benefits, such as central management of upgrades/improvements and bug fixes (as there will only be one install of the application on the server, just utilising multiple instances on the clients) as well as infinite reporting capability.. just to name a few.

Awesome - thank you Luna Monkey, that is exactly what I was looking for! :yes: It certainly seemed like a plausible concept for a CSS implementation of some sort. Your pat on the back is most deserved :D

Link to comment
Share on other sites

  • 0

It can be done and it works in Firefox. Heres an example I just made:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Windows Button</title>
<style type="text/css">
.buttoninner {
	background-color: ThreedFace;
	border-top: 1px solid ThreedFace;
	border-right: 1px solid ThreedShadow;
	border-bottom: 1px solid ThreedShadow;
	border-left: 1px solid ThreedFace;
}
.buttonouter {
	border-top: 1px solid ThreedHighlight;
	border-right: 1px solid ThreedDarkShadow;
	border-bottom: 1px solid ThreedDarkShadow;
	border-left: 1px solid ThreedHighlight;
	width: 200px;
}
body {
	background-color: ButtonFace;
}
</style>
</head>
<body>
<div class="buttonouter">
	<div class="buttoninner">blah</div>
</div>
</body>
</html>

Link to comment
Share on other sites

  • 0
It can be done and it works in Firefox. Heres an example I just made:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Windows Button</title>
<style type="text/css">
.buttoninner {
	background-color: ThreedFace;
	border-top: 1px solid ThreedFace;
	border-right: 1px solid ThreedShadow;
	border-bottom: 1px solid ThreedShadow;
	border-left: 1px solid ThreedFace;
}
.buttonouter {
	border-top: 1px solid ThreedHighlight;
	border-right: 1px solid ThreedDarkShadow;
	border-bottom: 1px solid ThreedDarkShadow;
	border-left: 1px solid ThreedHighlight;
	width: 200px;
}
body {
	background-color: ButtonFace;
}
</style>
</head>
<body>
<div class="buttonouter">
	<div class="buttoninner">blah</div>
</div>
</body>
</html>

585028036[/snapback]

Yes indeed, nice example.. just knocked something similar together myself.

I can see a lot of potential for this method to unify the look of my applications with their environments... this may prompt me to post a feature suggestion to Microsoft for adding a way to grab visual style colours using some internal method in IE.

Cheers :D

Link to comment
Share on other sites

  • 0

The examples at Bindows do this. On an XP system they show XP stylee forms, buttons etc. on 2K3? they show the usual style (the color picker sample rules!)

Link to comment
Share on other sites

  • 0
The examples at Bindows do this. On an XP system they show XP stylee forms, buttons etc. on 2K3? they show the usual style (the color picker sample rules!)

585028982[/snapback]

duude that's an awesome site!!! :woot:

Link to comment
Share on other sites

  • 0
The examples at Bindows do this. On an XP system they show XP stylee forms, buttons etc. on 2K3? they show the usual style (the color picker sample rules!)

585028982[/snapback]

Thats exactly what I want to do, only they are not acheiving that using HTML i dont believe, as it has to load assets first, but I am unsure. It's very very clever code though for sure!

I am not so sure that i quite understand how it is doing what it so obviously is :laugh:

Link to comment
Share on other sites

  • 0

Of course! Silly me, I didn't even think about ActiveX... I guess its because its now buried deep inside the whole COM thingy! Ok, well I will swat up and just use a combination of the CSS 3 implementation above and ActiveX Control Pad by Microsoft (http://www.download.com/2001-2206-0.html - number one on most popular list) to add the controls to my web app.

Spiffy! :D

Link to comment
Share on other sites

  • 0
It uses ActiveX controls - i.e. it only works in IE/Win32.

585033691[/snapback]

Are you sure on that one? Taken from Bindows faqs:

1.2 Is it limited to Internet Explorer?

No. For a long time Internet Explorer was the only browser that supported some features that are essential for Bindows?. Among others, these included deep event handling support, wide CSS support and XML functionality. In addition, IE is the only browser that, off-the-shelf, supports vector graphics. However, Bindows now supports Mozilla 1.4 and above with just few limitations.

------

By the way, I took a look at the Bindows source, it appears to be doing most everything with JavaScript.

I think I might be using this on my local machine for a few projects.

Link to comment
Share on other sites

  • 0

Correct, it uses JavaScript throughout (with XML as well). However, a few of the graphs are IE only as they use VML (like the gauge and line charts). Potentially this could be rectified (for line charts anyway) by using the sneaky slanted borders approach to make lines or even to use SVG (translating the VML using XSL)

Edited by mrbester
Link to comment
Share on other sites

  • 0

It's never worked in Firefox that I've seen. I've tried all the demos on two computers (home and work), both running Firefox, and the demos don't work in either. Regardless of whether it's ActiveX or not, not working in Firefox throws it out in my book.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.