fix(labels): text and background combination in dark mode
This commit is contained in:
parent
57c99a22a0
commit
b8c21c2ade
@ -27,7 +27,17 @@ export default class LabelModel extends AbstractModel<ILabel> implements ILabel
|
||||
if (this.hexColor !== '' && this.hexColor.substring(0, 1) !== '#') {
|
||||
this.hexColor = '#' + this.hexColor
|
||||
}
|
||||
this.textColor = colorIsDark(this.hexColor) ? '#4a4a4a' : '#fff'
|
||||
|
||||
if (this.hexColor === '') {
|
||||
this.hexColor = 'var(--grey-200)'
|
||||
this.textColor = 'var(--grey-800)'
|
||||
} else {
|
||||
this.textColor = colorIsDark(this.hexColor)
|
||||
// Fixed colors to avoid flipping in dark mode
|
||||
? 'hsl(215, 27.9%, 16.9%)' // grey-800
|
||||
: 'hsl(220, 13%, 91%)' // grey-200
|
||||
}
|
||||
|
||||
this.createdBy = new UserModel(this.createdBy)
|
||||
|
||||
this.created = new Date(this.created)
|
||||
|
Loading…
x
Reference in New Issue
Block a user