Habax
Habax

Reputation: 1330

Is it possible to get information about browser's colors?

Is it possible to get information about browser's colors? In order to code something that looks like a browser's toolbar.

Thanks!

Upvotes: 1

Views: 327

Answers (2)

stef
stef

Reputation: 14268

You should use the standard CSS operating-specific colours. In your CSS file, for instance:

#toolbar {
  background-color: ThreeDFace; 
  border-top: 1px solid ThreeDHighlight;
  border-bottom: 1px solid ThreeDShadow;
}

You can view what these colours would be in this article: http://webdesign.about.com/od/colorcharts/l/blsystemcolors.htm

Upvotes: 3

Willster
Willster

Reputation: 2586

Sounds a little like you're trying to spoof information from the user by doing something like this :S

You can make assumptions obviously based on the operating system and browser combination (incl version), and then create a toolbar based on the default colour schemes that are used. Browsers such as Firefox now have personas or themes which even the css2 system color space described by BoltClock is not rich enough to describe so there is no guarantee that you'll get it right every time. The average user does not deviate from the default colour schemes so you can have a good go at it.

Upvotes: 1

Related Questions