Compare commits
No commits in common. "4935439056c8086959748dc0d86830615d58060d" and "9343a28ca0808cd8fe1b5f0cf9e604aeeed77093" have entirely different histories.
4935439056
...
9343a28ca0
2 changed files with 3 additions and 8 deletions
|
@ -59,12 +59,12 @@ function App() {
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let message = document.getElementById("ubuntucola").value as string
|
let message = document.getElementById("ubuntucola").value as string
|
||||||
setMessage(getmisskeycolors(message, colors).replace(/\$\[fg\.color=[0-9A-Fa-f]{6} \]/g, ''));
|
setMessage(getmisskeycolors(message, colors));
|
||||||
}}>
|
}}>
|
||||||
generate!
|
generate!
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<code>{message()}</code>
|
<span>{message()}</span>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|
|
@ -52,13 +52,8 @@ export function getmisskeycolors(message:string, colors:string[]){
|
||||||
const [low, high , progress] = sampleFromArray(colors, i / (message.length - 1))
|
const [low, high , progress] = sampleFromArray(colors, i / (message.length - 1))
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
const color = lerpoklab(tozerotoone(colors[low]), tozerotoone(colors[high]), progress)
|
const color = lerpoklab(tozerotoone(colors[low]), tozerotoone(colors[high]), progress)
|
||||||
if (message[i] === " ") {
|
|
||||||
finalmessage += " "
|
|
||||||
} else {
|
|
||||||
finalmessage += (`$[fg.color=${tohexstring(color).substring(1)} ${message[i]}]`)
|
finalmessage += (`$[fg.color=${tohexstring(color).substring(1)} ${message[i]}]`)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
return finalmessage
|
return finalmessage
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue