[{"name":"Color","comment":" An Elm package to work with web colors.\n\nExample usage\n\n    colors : List Color\n    colors =\n        [ hsl 194 0.49 0.14\n        , fromHexUnsafe \"#06A77D\"\n        , rgb 0.96 0.976 0.996\n        , rgb255 122 137 194\n        ]\n\n    colorPalette : List Color\n    colorPalette =\n        fromPalette \"https://coolors.co/40f99b-61707d\"\n\n    green : Color\n    green =\n        hsl 164 0.93 0.34\n\n    fontColor : Color\n    fontColor =\n        if isLight green then\n            black\n\n        else\n            white\n\n    viewHtml : Html msg\n    viewHtml =\n        Html.div\n            [ style \"background-color\" (Color.toCssString green)\n            , style \"color\" (Color.toCssString fontColor)\n            ]\n            [ Html.text (toCssString green) ]\n\n\n# Types\n\n@docs Color\n\n\n# Creating colors\n\n\n## Standard way\n\n@docs rgb, hsl, gray\n\n\n## From strings\n\n@docs fromHex, fromPalette, fromHexUnsafe\n\n\n# Convert\n\n@docs toCssString, toRgba, toHsla, toHexString, toRgba255\n\n\n# Manipulate\n\n@docs invertRgb, setAlpha\n\n\n# Lightness\n\n@docs isLight, lightness\n\n\n# Transform\n\n\n## Rgb\n\n@docs mapRgb, mapRed, mapGreen, mapBlue, mapAlpha\n\n\n## HSL\n\n@docs mapHue, mapLightness, mapSaturation\n\n\n# Variants\n\nMore constructors\n\n@docs rgb255, rgba, hsla, rgba255, fromRgb, fromRgba, fromHsla, fromRgb255, fromHsl\n\n\n# Helper colors\n\n@docs black, white\n\n","unions":[],"aliases":[{"name":"Color","comment":" The Color type representing a color in rgba space\n","args":[],"type":"Color.Internal.Color"}],"values":[{"name":"black","comment":" #000000\n","type":"Color.Color"},{"name":"fromHex","comment":" Parse a hex string to a color\n\nCan handle different formats:\n\n    fromHex \"#000\"\n\n    fromHex \"#F0F0F0\"\n\n    fromHex \"0xA0A0A0\"\n\n    fromHex \"8F8F8F\"\n\n    fromHex \"#C6C6C680\"\n\n","type":"String.String -> Maybe.Maybe Color.Color"},{"name":"fromHexUnsafe","comment":" Like fromHex, but uses transparent (`rgba 0 0 0 0`) as default value.\n","type":"String.String -> Color.Color"},{"name":"fromHsl","comment":" Create a color from an HSL record\n\nHue takes a value between 0 and 360.\n\nSaturation and lightness take a value between 0 and 1.\n\n","type":"{ hue : Basics.Float, saturation : Basics.Float, lightness : Basics.Float } -> Color.Color"},{"name":"fromHsla","comment":" Create a color from an HSL(a) record\n\nHue takes a value between 0 and 360.\n\nSaturation, lightness, and alpha take a value between 0 and 1.\n\n","type":"{ hue : Basics.Float, saturation : Basics.Float, lightness : Basics.Float, alpha : Basics.Float } -> Color.Color"},{"name":"fromPalette","comment":" Parses different palette formats\n\n    fromPalette \"https://huemint.com/website-monochrome/#palette=fffffc-00eb80\"\n    --> List.filterMap Color.fromHex [ \"fffffc\", \"00eb80\" ] : List Color\n\n    fromPalette \"\"\"\n                fffffc\n                00eb80\n                000000\n                \"\"\"\n    --> List.filterMap Color.fromHex [ \"fffffc\", \"00eb80\", \"000000\" ] : List Color\n\n    fromPalette \"https://coolors.co/40f99b-61707d\"\n    --> List.filterMap Color.fromHex [ \"40f99b\", \"61707d\" ] : List Color\n\n    -- Infact, it works with everything that has 6 digits hex values\n    fromPalette \"xxxxfffffc-00eb80x000000---\"\n    --> List.filterMap Color.fromHex [ \"fffffc\", \"00eb80\", \"000000\" ] : List Color\n\n","type":"String.String -> List.List Color.Color"},{"name":"fromRgb","comment":" Create a color from an rgb record. Each channel takes a value between 0 and 1.\n","type":"{ red : Basics.Float, green : Basics.Float, blue : Basics.Float } -> Color.Color"},{"name":"fromRgb255","comment":" Create a color from an rgb record. Each channel takes a value between 0 and 255.\n","type":"{ red : Basics.Int, green : Basics.Int, blue : Basics.Int } -> Color.Color"},{"name":"fromRgba","comment":" Create a color from an rgba record. Each channel takes a value between 0 and 1.\n","type":"{ red : Basics.Float, green : Basics.Float, blue : Basics.Float, alpha : Basics.Float } -> Color.Color"},{"name":"gray","comment":" Create a gray color. I.e. for a 50% gray: `gray 0.5`\n","type":"Basics.Float -> Color.Color"},{"name":"hsl","comment":" Provide the hue, saturation and lightness channels for the color.\n\nHue takes a value between 0 and 360.\n\nSaturation and lightness take a value between 0 and 1.\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Color.Color"},{"name":"hsla","comment":" Provide the hue, saturation, lightness, and alpha channels for the color.\n\nHue takes a value between 0 and 360.\n\nSaturation, lightness, and alpha take a value between 0 and 1.\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Color.Color"},{"name":"invertRgb","comment":" Invert a color by flipping its r g b values\n","type":"Color.Color -> Color.Color"},{"name":"isLight","comment":" Determine if a color is light, that is, if the lightness is over 50% (`L* > 0.5`). Using the L\\* CIELAB color space for human percieved lightness.\n\nUseful for example if you want to change font color based on the lightness of the color.\n\n","type":"Color.Color -> Basics.Bool"},{"name":"lightness","comment":" Lightness is the **visual perception** of the luminance L of an object. It is the L\\* component of a color in the CIELAB and CIELUV space.\n\nFor more information on this, take a look at the implementation details!\n\n","type":"Color.Color -> Basics.Float"},{"name":"mapAlpha","comment":" ","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapBlue","comment":" ","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapGreen","comment":" ","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapHue","comment":" Map the hue of the color in HSL space\n","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapLightness","comment":" Map the lightness in the HSL space\n\n    darken : Color -> Color\n    darken =\n        mapLightness ((*) 0.95)\n\n","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapRed","comment":" ","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapRgb","comment":" Map over rgb channels\n\n    invertRgb : Color -> Color\n    invertRgb =\n        mapRgb (\\c -> 1 - c)\n\n","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"mapSaturation","comment":" Map the saturation of the color in HSL space\n","type":"(Basics.Float -> Basics.Float) -> Color.Color -> Color.Color"},{"name":"rgb","comment":" Provide the red, green, and blue channels for the color.\n\nEach channel takes a value between 0 and 1.\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Color.Color"},{"name":"rgb255","comment":" Provide the red, green, and blue channels for the color.\n\nEach channel takes a value between 0 and 255.\n\n","type":"Basics.Int -> Basics.Int -> Basics.Int -> Color.Color"},{"name":"rgba","comment":" Provide the red, green, blue, and alpha channels for the color.\n\nEach channel takes a value between 0 and 1.\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> Color.Color"},{"name":"rgba255","comment":" Provide the red, green, blue and alpha channels for the color.\n\nEach channel takes a value between 0 and 255.\n\n","type":"Basics.Int -> Basics.Int -> Basics.Int -> Basics.Int -> Color.Color"},{"name":"setAlpha","comment":" Set the alpha of the color\n","type":"Basics.Float -> Color.Color -> Color.Color"},{"name":"toCssString","comment":" Convert a color to an hex string. Use `toHexString` to omit the `#`-prefix.\n\n    toHexString (rgb 0.5 0.5 0.5) --> \"#808080\"\n\n","type":"Color.Color -> String.String"},{"name":"toHexString","comment":" Convert a color to an hex string. Use `toCssString` if you want a `#`-prefixed hex value.\n\n    toHexString (rgb 0.5 0.5 0.5) --> \"808080\"\n\n","type":"Color.Color -> String.String"},{"name":"toHsla","comment":" Deconstruct a Color into its hsla channels.\n","type":"Color.Color -> { hue : Basics.Float, saturation : Basics.Float, lightness : Basics.Float, alpha : Basics.Float }"},{"name":"toRgba","comment":" Deconstruct a Color into its rgba channels.\n","type":"Color.Color -> { red : Basics.Float, green : Basics.Float, blue : Basics.Float, alpha : Basics.Float }"},{"name":"toRgba255","comment":" Deconstruct a Color into its rgba255 channels.\n","type":"Color.Color -> { red : Basics.Int, green : Basics.Int, blue : Basics.Int, alpha : Basics.Int }"},{"name":"white","comment":" #FFFFFF\n","type":"Color.Color"}],"binops":[]},{"name":"Color.Accessibility","comment":" WCAG accessibility functions for color contrast analysis.\n\nThis module provides functions to calculate contrast ratios and check WCAG compliance\nfor color combinations, helping ensure your color choices meet accessibility standards.\n\n\n# Types\n\n@docs WcagLevel, TextSize\n\n\n# Contrast\n\n@docs contrastRatio\n\n\n# WCAG Compliance\n\n@docs meetsWcagAA, meetsWcagAAA, wcagLevel\n\n\n# Formatting\n\n@docs formatContrastRatio\n\n","unions":[{"name":"TextSize","comment":" Text size categories that affect contrast requirements.\n\n  - `Normal`: Regular text size (requires higher contrast ratios)\n  - `Large`: Large text (18pt+ or 14pt+ bold, requires lower contrast ratios)\n\n","args":[],"cases":[["Normal",[]],["Large",[]]]},{"name":"WcagLevel","comment":" WCAG compliance levels for accessibility standards.\n\n  - `AA`: Standard level (4.5:1 for normal text, 3:1 for large text)\n  - `AAA`: Enhanced level (7:1 for normal text, 4.5:1 for large text)\n  - `NotCompliant`: Does not meet any WCAG contrast requirements\n\n","args":[],"cases":[["AA",[]],["AAA",[]],["NotCompliant",[]]]}],"aliases":[],"values":[{"name":"contrastRatio","comment":" Calculate the contrast ratio between two colors according to WCAG guidelines.\n\nThe contrast ratio ranges from 1:1 (no contrast) to 21:1 (maximum contrast).\nIt's calculated using the formula: (L1 + 0.05) / (L2 + 0.05) where L1 is the\nlighter color's relative luminance and L2 is the darker color's relative luminance.\n\nFor semi-transparent colors, they are first blended with the background color\nbefore calculating the contrast ratio, as per WCAG guidelines.\n\n    contrastRatio (rgb 0 0 0) (rgb 1 1 1) --> 21.0 (black on white)\n\n    contrastRatio (rgb 0.5 0.5 0.5) (rgb 1 1 1) --> ~3.98 (gray on white)\n\n    contrastRatio (rgba 0 0 0 0.5) (rgb 1 1 1) --> ~3.98 (50% black blended with white)\n\n","type":"Color.Internal.Color -> Color.Internal.Color -> Basics.Float"},{"name":"formatContrastRatio","comment":" Format a contrast ratio as a string with ratio notation.\n\n        formatContrastRatio 4.5 --> \"4.5:1\"\n        formatContrastRatio 21.0 --> \"21:1\"\n\n","type":"Basics.Float -> String.String"},{"name":"meetsWcagAA","comment":" Check if two colors meet WCAG AA contrast requirements for a given text size.\n\n        meetsWcagAA Normal (rgb 0 0 0) (rgb 1 1 1) --> True (21:1 > 4.5:1)\n        meetsWcagAA Normal (rgb 0.7 0.7 0.7) (rgb 1 1 1) --> False (~2.8:1 < 4.5:1)\n        meetsWcagAA Large (rgb 0.7 0.7 0.7) (rgb 1 1 1) --> True (~2.8:1 > 3:1)\n\n","type":"Color.Accessibility.TextSize -> Color.Internal.Color -> Color.Internal.Color -> Basics.Bool"},{"name":"meetsWcagAAA","comment":" Check if two colors meet WCAG AAA contrast requirements for a given text size.\n\n        meetsWcagAAA Normal (rgb 0 0 0) (rgb 1 1 1) --> True (21:1 > 7:1)\n        meetsWcagAAA Normal (rgb 0.7 0.7 0.7) (rgb 1 1 1) --> False (~2.8:1 < 7:1)\n        meetsWcagAAA Large (rgb 0.3 0.3 0.3) (rgb 1 1 1) --> True (~5.7:1 > 4.5:1)\n\n","type":"Color.Accessibility.TextSize -> Color.Internal.Color -> Color.Internal.Color -> Basics.Bool"},{"name":"wcagLevel","comment":" Get the highest WCAG compliance level that two colors meet for both normal and large text sizes.\n\nReturns a record with the compliance levels for both text sizes.\n\n    wcagLevel (rgb 0 0 0) (rgb 1 1 1)\n    --> { normal = AAA, large = AAA }\n\n    wcagLevel (rgb 0.5 0.5 0.5) (rgb 1 1 1)\n    --> { normal = AA, large = AAA }\n\n    wcagLevel (rgb 0.8 0.8 0.8) (rgb 1 1 1)\n    --> { normal = NotCompliant, large = NotCompliant }\n\n","type":"Color.Internal.Color -> Color.Internal.Color -> { normal : Color.Accessibility.WcagLevel, large : Color.Accessibility.WcagLevel }"}],"binops":[]}]