-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Firstly, thanks! This is a really neat library. I have a draft of the same idea lying around somewhere, but I didn't get far with it. Yours is much better anyway, with the nice error messages, and little things like allowing non-alpha colours to have ff on the end (good because VSCode tends to insert them). I wouldn't have added named colours, or the & type synonym, but I guess neither of those things get in the way.
Anyway, given that Haskell does have a de facto standard colour library, would you consider adding first-class support for it?
The code is as simple as:
instance (IsWebColor s) => IsLabel s (Colour Double) where
fromLabel = webColor @s \r g b -> sRGB24 r g b
instance (IsWebColorAlpha s) => IsLabel s (AlphaColour Double) where
fromLabel = webColorAlpha @s \r g b a -> sRGB24 r g b `withOpacity` (fromIntegral a / 255)And colour has no dependencies of its own beyond base, so it isn't much to take on.
Metadata
Metadata
Assignees
Labels
No labels