Color Converter
Now that we can use RGBA color declarations more universally (as long as you don’t care about IE, but who does? Anyone? Anyone?) I’ve been finding myself adapting to the new paradigm of writing colors in RGBA instead of my familiar Hexadecimal notation. And if I’m working over some existing CSS and need to add some alpha channel it’s been kind of a pain to convert them. So I created this plugin to quickly convert Hex colors to RGBA. And while I was at it I added a script to convert them to regular RGB as well. And then I figured I should be backwards compatible and wrote one for converting RGBA and RGB to Hex. Enjoy.
Installation Instructions
Download the file and put the plugin in your ~/Library/Application Support/Coda/Plug-ins/ folder. There’s no Step 2.
Usage Instructions
To use it just highlight a color declaration you want converted. Be sure to get the whole thing including the #/rgba(/rgb( at the beginning and the ) at the end, or you’ll get some left over items in your converted colors. Now just choose the conversion you want to perform from the Plug-ins menu under Color Converter. And viola! Your old colors are converted to the new format. If you converted to RGBA, you will note that the cursor is inserted at the point where you will enter your alpha value. Just type a number from 0-1 and you’re done.
Note that as of this release the scripts only work for Hex to RGBA/RGB or RGBA/RGB to Hex. Therefore, don’t try to convert RGB to RGBA or vice versa. It either won’t do anything or return some really interesting values. I’ll add some more robust checks later, but figured for a simple plug-in like this the extra effort wasn’t warranted.
FileDownload
DownloadProjectInfo
- Version: 1.0
- Released: February 18, 2010
- Comments: 1
ShamelessBegging
Bandwidth isn't free, and creating things like this takes time. If you find these things useful then maybe you might consider making a small donation. It helps offset my bandwidth cost and will help me to keep improving them. Thanks.