Accessing the User's System Colors

By Luke Smith on July 15, 2005 7:21 PM

Let's say you want to create an app interface that has the look and feel of a desktop app. Well, besides the lack of state being an issue, there's the color issue. For better or worse, anybody can set their window colors to any number of horrendous combinations of painful colors. We're talking train wreck here. Or, for the sake of equality, let's say the user has an innate ability to mix and match colors like Rembrandt. Regardless, as a designer, you can't assume the audience has left their button colors alone. Well, there's an answer. CSS2 defines access to the user's system colors. Take a minute to skim over that... Done? Good, Perhaps you might be interested in making some links look like buttons. sample.html
<style>
  a {
    background: ButtonFace;
    color: ButtonText;
    border: 2px solid;
    border-color: ButtonHighLight ButtonShadow
                  ButtonShadow    ButtonHighLight;
    padding: 3px 5px;
  }
</style>
Have fun.

No TrackBacks (http://lucassmith.name/mt/mt-tb.cgi/18)

ls.n

LucasSmith.name

Luke and Heidi

I'm Luke. I am a front end engineer at Yahoo! on the YUI team.

Mostly I write about code stuff, but occassionally I'll mix in some real life. You've been warned.

Archives

Tags

Feeds

Subscribe to feed Recent entries

Content licensed under Creative Commons

Code licensed under BSD license

©2005 - 2010 Lucas Smith

Powered by Movable Type