Untitled

Run Settings
LanguageElm
Language Version
Run Command
module Main exposing (..) import Html exposing (text) import String import Char toHex : Int -> String toHex n = let hex = String.toUpper(toRadix n) in if String.length hex == 1 then "0" ++ hex else hex toRadix : Int -> String toRadix n = let getChr c = if c < 10 then toString c else String.fromChar <| Char.fromCode (87 + c) in if n < 16 then getChr n else (toRadix (n // 16)) ++ (getChr (n % 16)) type Color = Red | Green | Blue | Rgb { r: Int, g: Int, b: Int } colorToHex : Color -> String colorToHex color = case color of Red -> "#FF0000" Green -> "#00FF00" Blue -> "#0000FF" Rgb {r, g, b} -> String.concat ["#", (toHex r), (toHex g), (toHex b)] main = text(colorToHex(Rgb{r = 255, g = 255, b = 255}))
Editor Settings
Theme
Key bindings
Full width
Lines