diff options
| author | Henry Jameson <me@hjkos.com> | 2018-11-21 18:22:05 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-11-21 18:22:05 +0300 |
| commit | dc3df7bc4e91abf4a911e4c5ecc0c627d00dcfb1 (patch) | |
| tree | 79272ba90cc938562630d3ba19849757dc20e310 /src/components/user_card_content/user_card_content.js | |
| parent | acf414e4517434d8847e842930c697b168d94cde (diff) | |
fixes
Diffstat (limited to 'src/components/user_card_content/user_card_content.js')
| -rw-r--r-- | src/components/user_card_content/user_card_content.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index e8073021..6f9ed9fe 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -1,11 +1,13 @@ import StillImage from '../still-image/still-image.vue' +import { hex2rgb } from '../../services/color_convert/color_convert.js' export default { props: [ 'user', 'switcher', 'selected', 'hideBio' ], computed: { headingStyle () { - const rgb = this.$store.state.config.customTheme.colors.bg - if (rgb) { + const color = this.$store.state.config.customTheme.colors.bg + if (color) { + const rgb = (typeof color === 'string') ? hex2rgb(color) : color const tintColor = `rgba(${Math.floor(rgb.r)}, ${Math.floor(rgb.g)}, ${Math.floor(rgb.b)}, .5)` return { backgroundColor: `rgb(${Math.floor(rgb.r * 0.53)}, ${Math.floor(rgb.g * 0.56)}, ${Math.floor(rgb.b * 0.59)})`, |
