|
module Color.Utils (textColor) where
|
|
|
|
import Relude
|
|
|
|
import Crypto.Hash.SHA512
|
|
import Data.ByteString qualified as B
|
|
|
|
-- | Returns number < 216
|
|
textColor :: Text -> Word8
|
|
textColor t = let result = B.head . finalize . start $ encodeUtf8 t
|
|
in result `mod` 216
|