hedgeagent/1.12.0 #1
@@ -8,6 +8,7 @@ const config = require('./config')
|
||||
exports.generateAvatar = function (name) {
|
||||
// use darker colors for better contrast
|
||||
const color = new Chance(name).color({
|
||||
format: 'hex',
|
||||
max_red: 150,
|
||||
max_green: 150,
|
||||
max_blue: 150
|
||||
|
||||
@@ -710,7 +710,7 @@ function connection (socket) {
|
||||
|
||||
// initialize user data
|
||||
// random color
|
||||
let color = chance.color()
|
||||
let color = chance.color({ format: 'hex' })
|
||||
// make sure color not duplicated or reach max random count
|
||||
if (notes[noteId]) {
|
||||
let randomcount = 0
|
||||
@@ -723,7 +723,7 @@ function connection (socket) {
|
||||
}
|
||||
})
|
||||
if (found) {
|
||||
color = chance.color()
|
||||
color = chance.color({ format: 'hex' })
|
||||
randomcount++
|
||||
}
|
||||
} while (found && randomcount < maxrandomcount)
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Release Notes
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Bugfixes
|
||||
- Random colors for user's cursors and selections are now always in hex format to avoid conversion errors
|
||||
|
||||
## <i class="fa fa-tag"></i> 1.10.6 <i class="fa fa-calendar-o"></i> 2026-02-04
|
||||
|
||||
### Security fixes
|
||||
|
||||
@@ -427,7 +427,7 @@ const supportExtraTags = [
|
||||
text: '[random color tag]',
|
||||
search: '[]',
|
||||
command: function () {
|
||||
const color = chance().color()
|
||||
const color = chance().color({ format: 'hex' })
|
||||
return '[color=' + color + ']'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user