Skip to content

charliepark/colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colors

Colors is a library of 1x1 PNGs, available at colors.awesometm.com. It's an asset server, of sorts.

It's also a 1x1 PNG generator. Just go to the URL of the PNG you want (#444444 would be http://colors.awesometm.com/444444.png), and you can save the PNG to your own server.

FAQs

How do I use Colors?

Just tell your CSS file to use our URL. Like this:

	div.column {
	  background: url(http://colors.awesometm.com/444444.png) 0 0 repeat-y;
	  float: left;
	  margin 10px;
	  padding: 0 10px;
		width: 300px;
	}

In the above example, we pointed at 444444.png, but you can actually use any of the following syntaxes:

http://colors.awesometm.com/444444
http://colors.awesometm.com/444444.png
http://colors.awesometm.com/444
http://colors.awesometm.com/444.png

You've probably figured this out, but the value you use (in this case, 444444) is the hexadecimal code for the color you want. If you use the shortened form (123.png), Colors will automatically convert that to the appropriate longform hex code (112233.png).

So what does that get you?

It gets you a 1 pixel by 1 pixel PNG, of the color of your choice. These are useful as CSS background images, when you don't want to affect the width of your box model with a border-width.

If I want more options and flexibility, what can I do?

You can use Dummy Image, by my friend Russell.

Who's behind this?

Charlie Park

If I have a suggestion, what's the best way to get in touch?

For general "hey, this is cool!"-type notes, send a message via Twitter: (@charliepark).

For code suggestions ... Colors is totally open-source (it's all right here on Github), so feel free to poke around. The app was built using the Sinatra web framework, and uses the Chunky_PNG gem. If you have any suggestions on ways it could be improved, please let me know! Again, @charliepark is best for that.

About

All the 1x1 PNGs you can handle!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages