aboutsummaryrefslogtreecommitdiff
path: root/src/services/user_highlighter/user_highlighter.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services/user_highlighter/user_highlighter.js')
-rw-r--r--src/services/user_highlighter/user_highlighter.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/services/user_highlighter/user_highlighter.js b/src/services/user_highlighter/user_highlighter.js
index 31eba2c8..ebb25eca 100644
--- a/src/services/user_highlighter/user_highlighter.js
+++ b/src/services/user_highlighter/user_highlighter.js
@@ -1,12 +1,10 @@
import { hex2rgb } from '../color_convert/color_convert.js'
const highlightStyle = (prefs) => {
- if (prefs === undefined) {
- return
- }
+ if (prefs === undefined) return
const {color, type} = prefs
- console.log(arguments)
if (typeof color !== 'string') return
const rgb = hex2rgb(color)
+ if (rgb == null) return
const solidColor = `rgb(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)})`
const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .1)`
const tintColor2 = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .2)`