Compare commits

..

No commits in common. "4935439056c8086959748dc0d86830615d58060d" and "9343a28ca0808cd8fe1b5f0cf9e604aeeed77093" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View file

@ -59,12 +59,12 @@ function App() {
}
// @ts-ignore
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!
</button>
</div>
<code>{message()}</code>
<span>{message()}</span>
</div>
</>
)

View file

@ -52,13 +52,8 @@ export function getmisskeycolors(message:string, colors:string[]){
const [low, high , progress] = sampleFromArray(colors, i / (message.length - 1))
//@ts-ignore
const color = lerpoklab(tozerotoone(colors[low]), tozerotoone(colors[high]), progress)
if (message[i] === " ") {
finalmessage += " "
} else {
finalmessage += (`$[fg.color=${tohexstring(color).substring(1)} ${message[i]}]`)
}
}
return finalmessage
}