diff options
| author | Henry Jameson <me@hjkos.com> | 2019-12-28 15:55:42 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-12-28 15:55:42 +0200 |
| commit | e5a34870f0f7154712783fb6d9c20edf4c06ad35 (patch) | |
| tree | dfb04a3edb8b64f8ff2d5c2b7cb2b558692cdc1c /src/services/style_setter/style_setter.js | |
| parent | b8f4b18ae5e362bce97553cf4bcde1749b6fea32 (diff) | |
Accent works
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 |
