stop using customTheme in user card, instead use color slots. fix for opacity
inheritance polluting inheritors
This commit is contained in:
parent
0abc3f9b85
commit
d19c64314f
4 changed files with 24 additions and 17 deletions
|
@ -8,6 +8,7 @@ export const LAYERS = {
|
|||
undelay: null, // root
|
||||
topBar: null, // no transparency support
|
||||
badge: null, // no transparency support
|
||||
profileTint: null, // doesn't matter
|
||||
fg: null,
|
||||
bg: 'underlay',
|
||||
highlight: 'bg',
|
||||
|
@ -29,6 +30,7 @@ export const LAYERS = {
|
|||
* this allows redefining it to something else
|
||||
*/
|
||||
export const DEFAULT_OPACITY = {
|
||||
profileTint: 0.5,
|
||||
alert: 0.5,
|
||||
input: 0.5,
|
||||
faint: 0.5,
|
||||
|
@ -119,6 +121,20 @@ export const SLOT_INHERITANCE = {
|
|||
cGreen: '#00FF00',
|
||||
cOrange: '#E3FF00',
|
||||
|
||||
profileBg: {
|
||||
depends: ['bg'],
|
||||
color: (mod, bg) => ({
|
||||
r: Math.floor(bg.r * 0.53),
|
||||
g: Math.floor(bg.g * 0.56),
|
||||
b: Math.floor(bg.b * 0.59)
|
||||
})
|
||||
},
|
||||
profileTint: {
|
||||
depends: ['bg'],
|
||||
layer: 'profileTint',
|
||||
opacity: 'profileTint'
|
||||
},
|
||||
|
||||
highlight: {
|
||||
depends: ['bg'],
|
||||
color: (mod, bg) => brightness(5 * mod, bg).rgb
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue