diff --git a/elements/userlist.js b/elements/userlist.js index 6da2cd8..4092589 100644 --- a/elements/userlist.js +++ b/elements/userlist.js @@ -72,13 +72,12 @@ class UserList extends Component { render({ data }) { const el = document.createElement('div'); - const colormap = interpolate(['blue', 'green', 'yellow', 'red']); - const colorIndex = Math.min(data.length / 22, 22); + const colormap = interpolate(['#3465a4', '#729fcf', '#8ae234', '#fce94f', '#ef2929']); + const colorAtIndex = (val) => colormap(Math.min(val / 22, 22)); el.className = 'terminal'; el.innerHTML = `
user@c-beam> #who
-
${data.join(', ')}
-
total: ${data.length}
+
${data.join(', ')}
user@c-beam> _
`; if (data.join(', ').length > 100) {