Skip to content

Instantly share code, notes, and snippets.

@eddy1982
eddy1982 / Map_value_to_color_scale.php
Created May 8, 2015 09:56
Map value to color scale
<!-- Map value to color scale -->
<?php
function lineargradient($ra,$ga,$ba,$rz,$gz,$bz,$iterationnr) {
$colorindex = array();
for($iterationc=1; $iterationc<=$iterationnr; $iterationc++) {
$iterationdiff = $iterationnr-$iterationc;
$colorindex[] = '#'.
dechex(intval((($ra*$iterationc)+($rz*$iterationdiff))/$iterationnr)).
dechex(intval((($ga*$iterationc)+($gz*$iterationdiff))/$iterationnr)).
dechex(intval((($ba*$iterationc)+($bz*$iterationdiff))/$iterationnr));
$ git remote add origin https://github.com/eddy1982/sql.git
$ git remote set-url https://github.com/eddy1982/sql.git
$ git remote remove origin
$ git remote -v
$ git push origin master
強制修改上一次的commit
$ git commit --amend -m ''