201 |
</head> |
</head> |
202 |
<body> |
<body> |
203 |
<div id="sitewidth"> |
<div id="sitewidth"> |
204 |
<div id="news"> |
<div id="news" style="display: none;"> |
205 |
<h1>ColorMatch Remix</h1> |
<h1>ColorMatch Remix</h1> |
206 |
<p>This colorpicker is based heavily upon the code from <a href="http://colormatch.dk">ColorMatch 5k</a>. I've made it more compatible - it now works in Mozilla, and should also work in Opera, since I'm using a much better slider control. I've also added 3 more colors, bringing the total auto-generated colors to 9, and the ability to export your colors to a Photoshop color table.</p> |
<p>This colorpicker is based heavily upon the code from <a href="http://colormatch.dk">ColorMatch 5k</a>. I've made it more compatible - it now works in Mozilla, and should also work in Opera, since I'm using a much better slider control. I've also added 3 more colors, bringing the total auto-generated colors to 9, and the ability to export your colors to a Photoshop color table.</p> |
207 |
<p>You can also download the full source code <a href="colormatch.zip" title="Source Code">here.</a></p> |
<p>You can also download the full source code <a href="colormatch.zip" title="Source Code">here.</a></p> |
214 |
<li>Jan. 19, 2004: I've <a href="colormatch.zip" title="Everything you need.">zipped up</a> all the code, along with a dump of the database, for those of you who'd like to run it on your own server. All I request is that you link back to my main page.</li> |
<li>Jan. 19, 2004: I've <a href="colormatch.zip" title="Everything you need.">zipped up</a> all the code, along with a dump of the database, for those of you who'd like to run it on your own server. All I request is that you link back to my main page.</li> |
215 |
<li>Dec. 06, 2003: This site featured in Lockergnome's <a href="http://channels.lockergnome.com/windows/backissues/20031205.phtml">Windows Fanatics</a> newsletter! (Thanks for the link, Chris!) </li> |
<li>Dec. 06, 2003: This site featured in Lockergnome's <a href="http://channels.lockergnome.com/windows/backissues/20031205.phtml">Windows Fanatics</a> newsletter! (Thanks for the link, Chris!) </li> |
216 |
</ul> |
</ul> |
|
<form id="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> |
|
|
<p> |
|
|
<input type="hidden" name="cmd" value="_xclick" /> |
|
|
<input type="hidden" name="business" value="twyst@twysted.net" /> |
|
|
<input type="hidden" name="no_note" value="1" /> |
|
|
<input type="hidden" name="currency_code" value="USD" /> |
|
|
<input type="hidden" name="tax" value="0" /> |
|
|
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but21.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" /> |
|
|
</p> |
|
|
</form> |
|
217 |
</div> |
</div> |
218 |
<div id="allsliders"> |
<div id="allsliders"> |
219 |
<div class="spacer"></div> |
<div class="spacer"></div> |
243 |
</div> |
</div> |
244 |
</div> |
</div> |
245 |
<div id="slideright"> |
<div id="slideright"> |
246 |
<div id="color-result"></div> |
<div id="color-result"> |
247 |
|
<div style="float: left; width: 49%; text-align: center;" id="light" onClick="c2r('light');"> |
248 |
|
light |
249 |
|
</div> |
250 |
|
<div style="float: right; width: 49%; text-align: center;" id="dark" onClick="c2r('dark');"> |
251 |
|
dark |
252 |
|
</div> |
253 |
|
</div> |
254 |
</div> |
</div> |
255 |
<div class="spacer"></div> |
<div class="spacer"></div> |
256 |
</div> |
</div> |
299 |
<select id="coltheme" name="coltheme" onchange="load_theme();"> |
<select id="coltheme" name="coltheme" onchange="load_theme();"> |
300 |
<? |
<? |
301 |
include("config.php"); |
include("config.php"); |
302 |
$db = mysql_connect($dbhost,$dbuser,$dbpass); |
$db = pg_connect($pg); |
|
mysql_select_db($dbtable); |
|
303 |
$rgb = "$red,$green,$blue"; |
$rgb = "$red,$green,$blue"; |
304 |
$r = mysql_query("Select basecol,name from colorpick where approved='1' order by name"); |
$r = pg_query("select basecol,name from colorpick where approved='1' order by name"); |
305 |
while ($q = mysql_fetch_assoc($r)) { |
while ($q = pg_fetch_assoc($r)) { |
306 |
if($q["basecol"] == $rgb) { |
if($q["basecol"] == $rgb) { |
307 |
$sel = "selected=\"selected\" "; |
$sel = "selected=\"selected\" "; |
308 |
} else { |
} else { |
401 |
b.recalculate(); |
b.recalculate(); |
402 |
} |
} |
403 |
|
|
404 |
|
var step = 8; |
405 |
|
|
406 |
|
function inc(n) { |
407 |
|
if (n + step < 255) { |
408 |
|
n += step; |
409 |
|
} else { |
410 |
|
n = 255; |
411 |
|
} |
412 |
|
return n; |
413 |
|
} |
414 |
|
|
415 |
|
function dec(n) { |
416 |
|
if (n - step > 0) { |
417 |
|
n -= step; |
418 |
|
} else { |
419 |
|
n = 0; |
420 |
|
} |
421 |
|
return n; |
422 |
|
} |
423 |
|
|
424 |
|
function light() { |
425 |
|
r.setValue( inc( r.getValue() ) ); |
426 |
|
g.setValue( inc( g.getValue() ) ); |
427 |
|
b.setValue( inc( b.getValue() ) ); |
428 |
|
} |
429 |
|
|
430 |
|
function dark() { |
431 |
|
r.setValue( dec( r.getValue() ) ); |
432 |
|
g.setValue( dec( g.getValue() ) ); |
433 |
|
b.setValue( dec( b.getValue() ) ); |
434 |
|
} |
435 |
|
|
436 |
|
|
437 |
window.onresize = fixSize; |
window.onresize = fixSize; |
438 |
|
|
439 |
fixSize(); |
fixSize(); |