Skip to content

Commit

Permalink
refine colors
Browse files Browse the repository at this point in the history
  • Loading branch information
gka authored and halfdan committed Feb 20, 2013
1 parent 1bdc325 commit 8cb22c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plugins/UserCountryMap/js/realtime-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@
* unless you type Shift+Alt+C
*/
function visitColor(r) {
var col, engaged = r.actions > 3;
var col,
engaged = r.actions > 3;
if (colorMode == 'referrerType') {
col = ({
website: '#F29007',
Expand All @@ -177,9 +178,10 @@
}
// defu
else col = chroma.hsl(
engaged ? 20 : 42 * age(r), // hue
//engaged ? 20 : 42 * age(r), // hue
engaged ? 42 : 20 * age(r) + 10,
Math.sqrt(age(r)), // saturation
(engaged ? 0.4 : 0.5) - (1-age(r))* (engaged ? 0.35 : 0.45) // lightness
(engaged ? 0.5 : 0.4) - (1-age(r))* (engaged ? 0.45 : 0.35) // lightness
);
return col;
}
Expand Down

0 comments on commit 8cb22c7

Please sign in to comment.