Over the weekend I decided to do some experimenting with CSS 3 fonts, shadows and transitions. I decided to use Adobe Kuler’s API to power my little PHP experiment.
Adobe Kuler is a fantastic online color-picker, and more. You can create color themes based on an image, a color, engage with their community and interact through an API. The API part is what I liked the best.
I looked around and surprisingly there was no PHP library for Kuler, so I decided to create one. It is now hosted publicly in Github.
Usage is extremely simple:
require_once "Kuler/Api.php"; $kuler = new Kuler_Api('api_key'); $themes = $kuler->get('recent'); $colors = $themes->getSwatchesHex(true); //>> array("#516373", "#6C838C", "#F2E8C9", "#F2B999", "#F2F2F2") $themeUrl = $themes->getUrl(); //>> http://kuler.adobe.com/#themeID/1400104
I’ll continue to color my website with themes from the Kuler community and will probably create a WordPress plugin soon as well. Any ideas, questions or requests, leave a comment!