Drawbacks to using background-repeat only for colors?

Posted by ineedtosleep on Stack Overflow See other posts from Stack Overflow or by ineedtosleep
Published on 2010-04-07T19:57:22Z Indexed on 2010/04/07 20:03 UTC
Read the original article Hit count: 370

Filed under:
|
|

So I need some custom colors on a layout, but I'm looking for a better way of doing it other than just slapping a giant picture with (background: url(something.jpg)) in the layout.

Mostly I'm thinking of getting a color palette (i.e. from Adobe Kuler, colourlovers, etc.), getting a 5x5 sample of each color and sticking them in an array for CSS sprites or just as separate files and accessing them through: .color-one {transparent url(./one.gif) repeat} and just reusing that whenever I'd like to use the color.

Are there any drawbacks to doing it this way? And if there are should I just stick with web-safe colors or is there a better way of doing this?

© Stack Overflow or respective owner

Related posts about css

Related posts about css-selectors