diff --git a/README.md b/README.md index 5bfc0e8..15fbe51 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # colorer -Play around with hsla color +Play around with hsla color! + +Try it online: https://colorer.vercel.app/ ## Usage diff --git a/src/App.tsx b/src/App.tsx index c462650..e48983b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,59 +1,14 @@ -import { createSignal } from "solid-js"; +import { HslaProvider } from "/@/hsla-context"; +import Colorer from "/@lib/colorer"; -function Colorer(props) { - const [h, setH] = createSignal(1); - const [s, setS] = createSignal(50); - const [l, setL] = createSignal(50); - const [a, setA] = createSignal(1); - const hslColor = () => `hsla(${h()}, ${s()}%, ${l()}%, ${a()})`; +const startHsla = { h: 1, s: 50, l: 50, a: 1 }; - const changeH = (e) => setH(e.currentTarget.value); - const changeS = (e) => setS(e.currentTarget.value); - const changeL = (e) => setL(e.currentTarget.value); - const changeA = (e) => setA(e.currentTarget.value); - - return ( -
{hslColor()}+