268 Active Lovers [Record: 1991 on 12 November, 2007]
Lost PasswordRegister
  Everything  Articles  News  Trends  Interviews  Popular

COLOURlovers API Documentation and Showcase


Print this page Print this page


  

With the release of the COLOURlovers API, you can now access almost 1 million named colors and more than 325,000 color palettes for your creative projects and applications. Creating a theme editor and want to give your users some color theme options? Creating a visual project that ties keywords to colors? Who knows what amazingly creative stuff people will come up with.

Below are two showcase examples of the COLOURlovers API in action as well as the full API documentation. Happy API COLOURloving!

COLOURlovers API Usage Showcase

 

Desktop Color Search - AIR App

Desktop Color Search is an Adobe AIR app that runs on your desktop and allows you to search the entire COLOURlovers database for colors, palettes and patterns. You’ll need to download the Adobe AIR runtime in order to run Desktop Color Search, you can use the link below to install AIR. (It works in both Windows and on Mac OS X)
Special thanks to Levi McCallum at FutonMedia for coding the AIR app.

Download Desktop Color Finder  |  Download Adobe AIR

 
desktopcolorfinder.jpg
 
 

DEKAF LOVERS

A simple interface to COLOURlover’s deep, deep palette library, it creates randomized compositions using rectangular geometry drawn by the Degrafa drawing library.
Have some fun of your own color fun with Dekaf Lovers.
 
dekaflovers_api.jpg
dekaflovers_api_2.jpg
dekaflovers_api_3.jpg
 
 

COLOURlovers API Documentation

 

License:

Attribution-Noncommercial-Share Alike - http://creativecommons.org/licenses/by-nc-sa/3.0/
If you would like to use the API in ways outside of this license please contact us for permission.

 

Colors:

Request URLs: [For Multiple Colors]

http://www.colourlovers.com/api/colors
http://www.colourlovers.com/api/colors/new
http://www.colourlovers.com/api/colors/top
http://www.colourlovers.com/api/colors/random [No parameters allowed]

 
Parameters [Case-sensitve]: lover, hueRange, briRange, keywords, keywordExact, orderCol, sortBy, numResults, resultOffset
examples:

lover = COLOURlover
hueRange = 12,68 [values must be 0>value<359, and the left value must be less than the right value]
briRange = 2,88 [values must be 0>value<99, and the left value must be less than the right value]
keywords = search+term
keywordExact = X [Where X can be 0 or 1 - performs an exact search for the keywords passed. Default 0]
orderCol = X [Where X can be: dateCreated, score, name, numVotes, numViews]
sortBy = X [Where X can be: ASC, DESC]
numResults = 20 [Number of results to return, maximum of 100. Default 20]
resultOffset = 5 [Result offset, for paging. Default 0]
 
Requests with orderCol defined will override any /new or /top switch

Request URL: [For One Color]

http://www.colourlovers.com/api/color/1133EF - Where 1133EF is any 6 char hex value
 
Parameters: N/A

 
Example Result:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<colors>
	<color>
		<title><![CDATA[wet dirt]]></title>
		<userName><![CDATA[jessicabrown]]></userName>
		<numViews>0</numViews>
		<numVotes>0</numVotes>
		<numComments>0</numComments>
		<numHearts>0</numHearts>
		<rank>903853</rank>
		<dateCreated>2008-03-17 11:22:21</dateCreated>
		<hex>6B4106</hex>
		<rgb>
			<red>107</red>
			<green>65</green>
			<blue>6</blue>
		</rgb>
		<hsv>
			<hue>35</hue>
			<saturation>94</saturation>
			<value>42</value>
		</hsv>
		<description><![CDATA[]]></description>
		<url><![CDATA[http://www.colourlovers.com/color/6B4106/wet_dirt]]></url>
		<imageUrl><![CDATA[http://www.colourlovers.com/img/6B4106/100/100/wet_dirt.png]]></imageUrl>
		<apiUrl>http://www.colourlovers.com/api/color/6B4106</apiUrl>
	</color>
</colors>

 
Breakdown of API xml:

title Title / Name of the color CDATA
userName Username of the color’s creator CDATA
numViews Number of views this color has received
numVotes Number of votes this color has received
numComments Number of comments this color has received
numHearts Number of hearts this color has
rank This color’s rank on COLOURlovers.com
dateCreated Date this color was created
hex This color’s hex value
rgb RGB breakdown of this color
     red Red value
     green Green value
     blue Blue value
hsv HSV breakdown of this color
     hue Hue value
     saturation Saturation value
     value Value / Balance value
description This color’s description CDATA
url This color’s COLOURlovers.com URL CDATA
imageUrl Link to a png version of this color CDATA
apiUrl This color’s COLOURlovers.com API URL CDATA

 

Palettes:

Request URLs: [For Multiple Palettes]

http://www.colourlovers.com/api/palettes
http://www.colourlovers.com/api/palettes/new
http://www.colourlovers.com/api/palettes/top
http://www.colourlovers.com/api/palettes/random [No parameters allowed]

 
Parameters [Case-sensitve]: lover, hueOption, hex, keywords, keywordExact, orderCol, sortBy, numResults, resultOffset
examples:

lover = COLOURlover
hueOption = yellow,orange,red [possible values: red, orange, yellow, green, aqua, blue, violet, fuchsia]
hueOption = yellow,orange
hueOption = yellow
hex = 00FF33
keywords = search+term
keywordExact = X [Where X can be 0 or 1 - performs an exact search for the keywords passed. Default 0]
orderCol = X [Where X can be: dateCreated, score, name, numVotes, numViews]
sortBy = X [Where X can be: ASC, DESC]
numResults = 20 [Number of results to return, maximum of 100. Default 20]
resultOffset = 5 [Result offset, for paging. Default 0]
 
Requests with orderCol defined will override any /new or /top switch

Request URL: [For One Palette]

http://www.colourlovers.com/api/palette/113451 - Where 113451 is a valid paletteID
 
Parameters: N/A

 
Example Result:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<palettes>
	<palette>
		<title><![CDATA[be my boy]]></title>
		<userName><![CDATA[sinta schneider]]></userName>
		<numViews>1052</numViews>
		<numVotes>37</numVotes>
		<numComments>13</numComments>
		<numHearts>4.5</numHearts>
		<rank>1</rank>
		<dateCreated>2008-03-01 16:19:21</dateCreated>
		<colors>
			<hex>423238</hex>
			<hex>F5DE8C</hex>
			<hex>C8D197</hex>
			<hex>B3702D</hex>
			<hex>EB2138</hex>
		</colors>
		<description><![CDATA[]]></description>
		<url><![CDATA[http://www.colourlovers.com/palette/293826/be_my_boy]]></url>
		<imageUrl><![CDATA[http://www.colourlovers.com/paletteImg/423238/F5DE8C/C8D197/B3702D/EB2138/be_my_boy.png]></imageUrl>
		<apiUrl>http://www.colourlovers.com/api/palette/293826</apiUrl>
	</palette>
</palettes>

Breakdown of API xml:

title Title / Name of the palette CDATA
userName Username of the palette’s creator CDATA
numViews Number of views this palette has received
numVotes Number of votes this palette has received
numComments Number of comments this palette has received
numHearts Number of palette this color has
rank This palette’s rank on COLOURlovers.com
dateCreated Date this palette was created
colors List of colors within this palette
     hex Hex value
     hex Hex value
     [hex] Hex value [may not be present]
     [hex] Hex value [may not be present]
     [hex] Hex value [may not be present]
description This palette’s description CDATA
url This palette’s COLOURlovers.com URL CDATA
imageUrl Link to a png version of this palette CDATA
apiUrl This palette’s COLOURlovers.com API URL CDATA

 

Patterns:

Request URLs: [For Multiple Patterns]

http://www.colourlovers.com/api/patterns
http://www.colourlovers.com/api/patterns/new
http://www.colourlovers.com/api/patterns/top
http://www.colourlovers.com/api/patterns/random [No parameters allowed]

 
Parameters [Case-sensitve]: lover, hueOption, hex, keywords, keywordExact, orderCol, sortBy, numResults, resultOffset
examples:

lover = COLOURlover
hueOption = yellow,orange,red [possible values: red, orange, yellow, green, aqua, blue, violet, fuchsia]
hueOption = yellow,orange
hueOption = yellow
hex = 00FF33
keywords = search+term
keywordExact = X [Where X can be 0 or 1 - performs an exact search for the keywords passed. Default 0]
orderCol = X [Where X can be: dateCreated, score, name, numVotes, numViews]
sortBy = X [Where X can be: ASC, DESC]
numResults = 20 [Number of results to return, maximum of 100. Default 20]
resultOffset = 5 [Result offset, for paging. Default 0]
 
Requests with orderCol defined will override any /new or /top switch

Request URL: [For One Pattern]

http://www.colourlovers.com/api/pattern/1451 - Where 1451 is a valid patternID
 
Parameters: N/A

 
Example Result:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<patterns>
	<pattern>
		<title><![CDATA[Tenderness.]]></title>
		<userName><![CDATA[not.an.am.person]]></userName>
		<numViews>617</numViews>
		<numVotes>32</numVotes>
		<numComments>14</numComments>
		<numHearts>4.5</numHearts>
		<rank>1</rank>
		<dateCreated>2008-03-01 06:43:38</dateCreated>
		<colors>
			<hex>C6C5AC</hex>
			<hex>CDB89F</hex>
			<hex>D4AA93</hex>
			<hex>B8E0C5</hex>
			<hex>BFD3B8</hex>
		</colors>
		<description><![CDATA[]]></description>
		<url><![CDATA[http://www.colourlovers.com/pattern/49471/Tenderness.]]></url>
		<imageUrl><![CDATA[http://colourlovers.com.s3.amazonaws.com/images/patterns/49/49471.png]></imageUrl>
		<apiUrl>http://www.colourlovers.com/api/pattern/49471</apiUrl>
	</pattern>
</patterns>

Breakdown of API xml:

title Title / Name of the pattern CDATA
userName Username of the pattern’s creator CDATA
numViews Number of views this pattern has received
numVotes Number of votes this pattern has received
numComments Number of comments this pattern has received
numHearts Number of pattern this color has
rank This pattern’s rank on COLOURlovers.com
dateCreated Date this pattern was created
colors List of colors within this pattern
     hex Hex value
     hex Hex value
     [hex] Hex value [may not be present]
     [hex] Hex value [may not be present]
     [hex] Hex value [may not be present]
description This pattern’s description CDATA
url This pattern’s COLOURlovers.com URL CDATA
imageUrl Link to a png version of this pattern CDATA
apiUrl This pattern’s COLOURlovers.com API URL CDATA

 

Lovers:

Request URLs: [For Multiple Lovers]

http://www.colourlovers.com/api/lovers
http://www.colourlovers.com/api/lovers/new
http://www.colourlovers.com/api/lovers/top
 
Parameters [Case-sensitve]: orderCol, sortBy, numResults, resultOffset

examples:

orderCol = X [Where X can be: lastActive, name]
sortBy = X [Where X can be: ASC, DESC]
numResults = 20 [Number of results to return, maximum of 100. Default 20]
resultOffset = 5 [Result offset, for paging. Default 0]

Requests with orderCol defined will override any /new or /top switch

Request URL: [For One Lover]

http://www.colourlovers.com/api/lover/COLOURlover - Where COLOURlover is a valid COLOURlovers.com Username

Parameters [Case-sensitve]: comments
examples:

comments = 1 [will show last 10 comments for given lover]

Example Result:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lovers>
	<lover>
		<userName><![CDATA[electrikmonk]]></userName>
		<dateRegistered>2005-08-07 6:45:47</dateRegistered>
		<dateLastActive>2008-03-16 21:02:01</dateLastActive>
		<rating>554159</rating>
		<location><![CDATA[#FF0000stick, LA, US]]></location>
		<numColors>3,498</numColors>
		<numPalettes>2,775</numPalettes>
		<numPatterns>36</numPatterns>
		<numCommentsMade>7,201</numCommentsMade>
		<numLovers>710</numLovers>
		<numCommentsOnProfile>672</numCommentsOnProfile>
		Optional comments [Only returned when viewing one lover with the ?comments=1]
		<comments>
			<comment>
			<commentDate>2008-03-10 05:10:58</commentDate>
				<commentUserName><![CDATA[mashedpotato]]></commentUserName>
				<commentComments><![CDATA[you are so awesome. :x ]]></commentComments>
			</comment>
		</comments>
		<url><![CDATA[http://www.colourlovers.com/lover/electrikmonk]]></url>
		<apiUrl><![CDATA[http://www.colourlovers.com/api/lover/electrikmonk]]></apiUrl>
	</lover>
</lovers>

 
Breakdown of API xml:

userName This lover’s Username CDATA
dateRegistered Date this lover registered with COLOURlovers.com
dateLastActive Date this lover was last active on COLOURlovers.com
rating This lover’s rating
location This lover’s location
numColors Number of colors this lover has made
numPalettes Number of palettes this lover has made
numPatterns Number of patterns this lover has made
numCommentsMade Number of comments this lover has made
numLovers Number of lovers [friends] this lover has
numCommentsOnProfile Number of comments this lover has on their profile
Optional comments [Only returned when viewing one lover with the ?comments=1]
comments Last 10 comments made on this lover’s profile
     comment Individual comment
          commentDate Date the comment was made Format YYYY-MM-DD HH:MM:SS - times are CST/CDT
          commentUserName Commenter’s COLOURlovers.com Username CDATA
          commentComments And finally, the comments! CDATA
url This lovers’s COLOURlovers.com URL CDATA
apiUrl This lovers’s COLOURlovers.com API URL CDATA

 

Example API code [PHP]:


<?php
	$curl = curl_init();
	curl_setopt($curl,CURLOPT_URL,"http://www.colourlovers.com/api/colors/new");
	curl_setopt($curl,CURLOPT_HEADER,false);
	curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
	$xml = curl_exec($curl);
	curl_close($curl);

	header("Content-Type: text/xml; charset=utf-8");
	echo $xml;
?>

 

PHP Wrapper to the API

phpColourLover PHP wrapper for the COLOURlovers API by gsmonk
 

COLOURlovers API


Copyright © 2008, COLOURlovers.com

All rights reserved.

Access to the services provided by this website and the COLOURlovers API and use of the information and services provided through the same, with or without modification, are permitted provided that the following conditions are met:

  • Websites or software that use the information and services provided by this website and API must provide attribution credit to colourlovers.com.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of colourlovers.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission, apart from the required attribution above.

 
THIS WEBSITE AND THE COLOURlovers API IS PROVIDED BY COLOURLOVERS.COM “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COLOURLOVERS.COM BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 April, 2008
Comments 30
del.icio.usnetscapenewsvinetechnoratifurl
    Did you enjoy our post? Get our blog feed by Email or RSS for daily updates.
 
Comments

Showing 1 - 17 of 17 Comments

yaoisoup
yaoisoup wrote:
2 Apr, 2008 @ 10:27 AM
OMG Excellent! I know nothing about api and all that, but AIR app - I'll be taking that! :DDDD Thank you very much!

manekinek…
manekineko wrote:
2 Apr, 2008 @ 11:20 AM
Awesome I'd love to put something together if I can find the time...nice job CL

inday
inday wrote:
2 Apr, 2008 @ 5:41 PM
This comes in handy! The Desktop Color Search is indispensable tool for designers.

ZicoCario…
2 Apr, 2008 @ 6:06 PM
Pretty cool!

geeksmake…
2 Apr, 2008 @ 6:10 PM
OMG, I'm in love all over again.

oxox to my favorite colour geek :)

torryster
torryster wrote:
2 Apr, 2008 @ 7:44 PM
WONDERFUL~

I‘m sure it will be widely accepted as a professional color tool~

jowra
jowra wrote:
2 Apr, 2008 @ 11:33 PM
Great! I will add some random palettes to my new site.

Thanks a lot! :-)

J-man
J-man wrote:
3 Apr, 2008 @ 7:01 AM
Looks like fun, I'm going to have to play around with it.. I wonder what I could do with the image functions in php (heh, probably not much..).

consonant
consonant wrote:
3 Apr, 2008 @ 7:01 AM
AIR App. for COLOURlovers is really rocking! Thanks for coding!

eskimoblo…
5 Apr, 2008 @ 9:43 AM
Thats cool. We will implement it in the upcoming colorLib for processing.

visualrin…
5 Apr, 2008 @ 6:38 PM
you all should definitely try building some stuff with this API... it's a snap!

gsmonk
gsmonk wrote:
6 Apr, 2008 @ 3:39 PM
Don't know exactly where to post this, but for all you PHP people on the site, I have written a PHP wrapper to the API.

phpColourLover. jsColourLover is also in the works!

J-man
J-man wrote:
7 Apr, 2008 @ 10:51 AM
Oh, that looks really good, probably better than what I'm using right now.. ^_^
So anyway, I came up with a little something in php. It takes palettes and turns them into gradients. You can search for palettes by keyword and lover, as well as get the top and new palettes. You can also choose the width of the gradient and the amount of palettes to get. It was pretty hard to get started, mainly because I never have had to grab data from an xml file (This is the first API I've really used..), and because some palettes have only 2, 3, or 4 colors instead of 5.. :P So yeah, link is here, and use all my bandwidth! Actually don't worry about it, I think I have plenty.. :P

J-man
J-man wrote:
7 Apr, 2008 @ 10:53 AM
Uh, that was supposed to be don't use all my bandwidth. No edit button.. :(

terriann
terriann wrote:
10 Apr, 2008 @ 10:05 AM
Great as if I didn't spend all my free time coming up with new ideas of projects I will never have time to finish. Thanks for adding yet another.

I'm quite excited though that you've created an API. This is one I'll definitely get to playing with soon!

ryan.detz…
23 Apr, 2008 @ 5:17 PM
Hey, I'm experimenting with the API and I've added a feature to my site so people can see any colour lover palettes for a color if they exist. I might add some more features later but I think this will help me out a lot when I'm looking for new color palettes from web designs I like.

Example:
http://www.inspirationfolder.com/site/2167/colourlovers.com.html

tr67
tr67 wrote:
4 May, 2008 @ 6:19 PM
*bounce*
 Add a Comment

       You must be logged in to post a comment.


Trackbacks
13 Trackbacks So Far...Hooray!

Introducing the COLOURlovers API & AIR Application | White Sands Digital
2 Apr, 2008 @ 12:18 PM
[...] the launch of the COLOURlovers Desktop Color Finder desktop application developed in Adobe AIR. read more | digg story Share and Enjoy: These icons link to social bookmarking sites where readers can [...]
Nutspress: COLOURlovers の AdobeAir を使ったデスクトップアプリケーション
2 Apr, 2008 @ 6:57 PM
[...] COLOURloversは色見本を探す上でよく利用させてもらってるサイトですけど、このDesktop Color Searchを使えば、サイトを開いてなくても簡単に色見本を探すことが出来ます。 [...]
» Silicon Florist’s links arrangement - Silicon Florist
2 Apr, 2008 @ 11:00 PM
[...] COLOURlovers API Documentation and Showcase The folks at COLOURlovers write “With the release of the COLOURlovers API, you can now access almost 1 million named colors and more than 325,000 color palettes for your creative projects and applications. Creating a theme editor and want to give your users some color theme options? Creating a visual project that ties keywords to colors? Who knows what amazingly creative stuff people will come up with.” [...]
nerdd.net | news and opinion
3 Apr, 2008 @ 1:18 AM
Introducing the COLOURlovers API & AIR Application | nerdd.net...

\r\nWith the release of the COLOURlovers API, you can now access almost 1 million named colors and m...
I got Dugg, sorta. Congrats to ColourLovers on Launching Their API. | Visualrinse | Design and Development by Chad Udell
3 Apr, 2008 @ 5:56 AM
[...] the response has been phenomenal (The AIR app built with it is definitely worth a download). The API is super cool and very very easy to use. I built a port of my Dekaf app (built with Degrafa) in it [...]
COLOURlovers API
7 Apr, 2008 @ 5:06 AM
[...] COLOURlovers API Documentation & Showcase [...]
Color + Design Blog / Congratulations! You're Our 1,000,000th Color! by COLOURlovers
4 May, 2008 @ 7:37 AM
[...] 1 million milestone color. Thank you all for sharing so much color love with us. (And now that the Color API is up and running, some creative folks are going to find some awesome ways to play with that color [...]
Love Color? Use This API
6 May, 2008 @ 8:48 PM
[...] the terrific site for the color and design community now has its own API. For those not familiar with COLOURlovers, it’s “a resource that monitors and [...]
ColourLover lance son API | Korben's Blog
10 May, 2008 @ 7:00 AM
[...] Ca se passe par là ! (avec les exemples d’utilisations) [...]
Give your Admin Area Some Colorful Love « planetOzh
12 May, 2008 @ 2:15 PM
[...] chief lover, Darius, letting me know about the API they were about to release (and did released since, of [...]
WPCandy » COLOURlovers Admin CSS Designer Tool
13 May, 2008 @ 2:00 AM
[...] value. All of this snazzy re-decorating is done with the help of COLOURlover’s new developer API. If you find a combination of colors you like, you can save the palette as a CSS stylesheet for [...]
Wp Wordpress » Blog Archive » COLOURlovers Admin CSS Designer Tool
13 May, 2008 @ 3:01 AM
[...] value. All of this snazzy re-decorating is done with the help of COLOURlover’s new developer API. If you find a combination of colors you like, you can save the palette as a CSS stylesheet for [...]
Admin CSS Designer wordpress plugin to color (colourlovers) wordpress admin interface | Wordpress & Plugins
14 May, 2008 @ 11:13 PM
[...] a new one and tweak it to your liking.The Admin CSS Designer Tool wordpress plugin makes use of COLOURlovers developer API to let you play around with colour schemes.You can even “save” a palette as a CSS [...]
Most Loved Blog Posts
Feeds & Favorites


Contribute
Share the Love Do you have something interesting and colorful you want to share with
over 600,000 lovers per month? We'd love to have you as a guest
author, so send us an email with your tips or what you'd like to write about.

Send Us Your Ideas or Tips
Blog Search & Archives
Browse Archives
Search Blog
Latest Palettes & Patterns
Recently Active Lovers
ForumsPalettesColorsPatternsLoversBlogTrendsGroupsStoreAboutContactAPIFAQ
© 2008 Lord IV. All Rights Reserved | Privacy & Terms of Use