mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
update background color
This commit is contained in:
parent
ea031fd909
commit
e48b2ace43
1 changed files with 2 additions and 3 deletions
|
|
@ -88,9 +88,8 @@ let timeout;
|
|||
function updateURL() {
|
||||
clearTimeout(timeout)
|
||||
timeout = setTimeout(() => {
|
||||
parent.postMessage({updateHash:"#/c:" + currentColor}, "*");
|
||||
parent.postMessage({updateHash:"#/c:" + new Color(currentColor).to("srgb").toString({format: "hex"})}, "*");
|
||||
},100);
|
||||
|
||||
}
|
||||
|
||||
function renderCanvas() {
|
||||
|
|
@ -116,7 +115,7 @@ function renderCanvas() {
|
|||
ctx.fillRect(0, 0, w, h/4);
|
||||
|
||||
let color = new Color(currentColor);
|
||||
document.body.style.backgroundColor = currentColor;
|
||||
document.body.style.backgroundColor = color;
|
||||
|
||||
|
||||
color.hsl.s = 100;
|
||||
|
|
|
|||
Loading…
Reference in a new issue