diff options
Diffstat (limited to 'src/services/style_setter/style_setter.js')
| -rw-r--r-- | src/services/style_setter/style_setter.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js index eaa495c4..1e4bc59e 100644 --- a/src/services/style_setter/style_setter.js +++ b/src/services/style_setter/style_setter.js @@ -160,7 +160,13 @@ const generateColors = (input) => { } return acc }, {})) - const col = Object.entries(input.colors || input).reduce((acc, [k, v]) => { + + const inputColors = input.colors || input + + const compat = input.v3compat || {} + const compatColors = compat.colors || {} + + const col = Object.entries({ ...inputColors, ...compatColors }).reduce((acc, [k, v]) => { if (typeof v === 'object') { acc[k] = v } else { @@ -174,7 +180,10 @@ const generateColors = (input) => { colors.text = col.text colors.lightText = brightness(20 * mod, colors.text).rgb - colors.link = col.link + + colors.accent = col.accent || col.link + colors.link = col.link || col.accent + colors.faint = col.faint || Object.assign({}, col.text) colors.bg = col.bg |
