inspector: display transparent colors & ensure color picker is always visible
This commit is contained in:
parent
fb0b629b1c
commit
d269c30bae
2 changed files with 3 additions and 2 deletions
|
|
@ -95,10 +95,10 @@ class UiInspectorField extends UiWidget {
|
|||
|
||||
let style = window.getComputedStyle(this.widget.container),
|
||||
colorData = this.widget.constructor.cssVariables.find(x=>x.js === this.name),
|
||||
val = '#000'
|
||||
val = 'transparent'
|
||||
|
||||
try {
|
||||
val = chroma(style.getPropertyValue(colorData.css).trim()).hex('rgb')
|
||||
val = chroma(style.getPropertyValue(colorData.css).trim()).hex('rgba')
|
||||
} catch(e) {}
|
||||
|
||||
let picker = html`<osc-inspector-color type="text" name="${this.name}" value="${val}" style="--color-picker-value: ${val}"></osc-inspector-color>`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue