Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix namespace collision attempt 2 #26

Merged
merged 9 commits into from
Jul 3, 2020
Merged

Conversation

tesk9
Copy link
Owner

@tesk9 tesk9 commented Apr 25, 2020

For #13

This is a MAJOR change.

---- ADDED MODULES - MINOR ----

    SolidColor
    SolidColor.Accessibility
    TransparentColor


---- REMOVED MODULES - MAJOR ----

    Color
    Color.Accessibility
    Color.Transparent


---- Palette.Cubehelix - MAJOR ----

    Changed:
      - type alias AdvancedConfig =
            { start : Color
            , rotationDirection : RotationDirection
            , rotations : Float
            , gamma : Float
            }
      + type alias AdvancedConfig =
            { start : SolidColor.SolidColor
            , rotationDirection : Palette.Cubehelix.RotationDirection
            , rotations : Basics.Float
            , gamma : Basics.Float
            }

      - generate : Int -> List Color
      + generate : Basics.Int -> List.List SolidColor.SolidColor

      - generateAdvanced : Int -> AdvancedConfig -> List Color
      + generateAdvanced :
            Basics.Int
            -> Palette.Cubehelix.AdvancedConfig
            -> List.List SolidColor.SolidColor



---- Palette.Generative - MAJOR ----

    Changed:
      - complementary : Color -> Color
      + complementary : SolidColor.SolidColor -> SolidColor.SolidColor

      - monochromatic : Float -> Color -> List Color
      + monochromatic :
            Basics.Float
            -> SolidColor.SolidColor
            -> List.List SolidColor.SolidColor

      - splitComplementary : Float -> Color -> ( Color, Color )
      + splitComplementary :
            Basics.Float
            -> SolidColor.SolidColor
            -> ( SolidColor.SolidColor, SolidColor.SolidColor )

      - square : Color -> ( Color, Color, Color )
      + square :
            SolidColor.SolidColor
            -> ( SolidColor.SolidColor
               , SolidColor.SolidColor
               , SolidColor.SolidColor
               )

      - tetratic : Float -> Color -> ( Color, Color, Color )
      + tetratic :
            Basics.Float
            -> SolidColor.SolidColor
            -> ( SolidColor.SolidColor
               , SolidColor.SolidColor
               , SolidColor.SolidColor
               )

      - triadic : Color -> ( Color, Color )
      + triadic :
            SolidColor.SolidColor
            -> ( SolidColor.SolidColor, SolidColor.SolidColor )



---- Palette.Tango - MAJOR ----

    Changed:
      - aluminum1 : Color
      + aluminum1 : SolidColor.SolidColor

      - aluminum2 : Color
      + aluminum2 : SolidColor.SolidColor

      - aluminum3 : Color
      + aluminum3 : SolidColor.SolidColor

      - aluminum4 : Color
      + aluminum4 : SolidColor.SolidColor

      - aluminum5 : Color
      + aluminum5 : SolidColor.SolidColor

      - aluminum6 : Color
      + aluminum6 : SolidColor.SolidColor

      - butter1 : Color
      + butter1 : SolidColor.SolidColor

      - butter2 : Color
      + butter2 : SolidColor.SolidColor

      - butter3 : Color
      + butter3 : SolidColor.SolidColor

      - chameleon1 : Color
      + chameleon1 : SolidColor.SolidColor

      - chameleon2 : Color
      + chameleon2 : SolidColor.SolidColor

      - chameleon3 : Color
      + chameleon3 : SolidColor.SolidColor

      - chocolate1 : Color
      + chocolate1 : SolidColor.SolidColor

      - chocolate2 : Color
      + chocolate2 : SolidColor.SolidColor

      - chocolate3 : Color
      + chocolate3 : SolidColor.SolidColor

      - orange1 : Color
      + orange1 : SolidColor.SolidColor

      - orange2 : Color
      + orange2 : SolidColor.SolidColor

      - orange3 : Color
      + orange3 : SolidColor.SolidColor

      - plum1 : Color
      + plum1 : SolidColor.SolidColor

      - plum2 : Color
      + plum2 : SolidColor.SolidColor

      - plum3 : Color
      + plum3 : SolidColor.SolidColor

      - scarletRed1 : Color
      + scarletRed1 : SolidColor.SolidColor

      - scarletRed2 : Color
      + scarletRed2 : SolidColor.SolidColor

      - scarletRed3 : Color
      + scarletRed3 : SolidColor.SolidColor

      - skyBlue1 : Color
      + skyBlue1 : SolidColor.SolidColor

      - skyBlue2 : Color
      + skyBlue2 : SolidColor.SolidColor

      - skyBlue3 : Color
      + skyBlue3 : SolidColor.SolidColor



---- Palette.X11 - MAJOR ----

    Changed:
      - aliceBlue : Color
      + aliceBlue : SolidColor.SolidColor

      - antiqueWhite : Color
      + antiqueWhite : SolidColor.SolidColor

      - aqua : Color
      + aqua : SolidColor.SolidColor

      - aquamarine : Color
      + aquamarine : SolidColor.SolidColor

      - azure : Color
      + azure : SolidColor.SolidColor

      - beige : Color
      + beige : SolidColor.SolidColor

      - bisque : Color
      + bisque : SolidColor.SolidColor

      - black : Color
      + black : SolidColor.SolidColor

      - blanchedAlmond : Color
      + blanchedAlmond : SolidColor.SolidColor

      - blue : Color
      + blue : SolidColor.SolidColor

      - blueViolet : Color
      + blueViolet : SolidColor.SolidColor

      - brown : Color
      + brown : SolidColor.SolidColor

      - burlywood : Color
      + burlywood : SolidColor.SolidColor

      - cadetBlue : Color
      + cadetBlue : SolidColor.SolidColor

      - chartreuse : Color
      + chartreuse : SolidColor.SolidColor

      - chocolate : Color
      + chocolate : SolidColor.SolidColor

      - coral : Color
      + coral : SolidColor.SolidColor

      - cornflowerBlue : Color
      + cornflowerBlue : SolidColor.SolidColor

      - cornsilk : Color
      + cornsilk : SolidColor.SolidColor

      - crimson : Color
      + crimson : SolidColor.SolidColor

      - cyan : Color
      + cyan : SolidColor.SolidColor

      - darkBlue : Color
      + darkBlue : SolidColor.SolidColor

      - darkCyan : Color
      + darkCyan : SolidColor.SolidColor

      - darkGoldenrod : Color
      + darkGoldenrod : SolidColor.SolidColor

      - darkGray : Color
      + darkGray : SolidColor.SolidColor

      - darkGreen : Color
      + darkGreen : SolidColor.SolidColor

      - darkKhaki : Color
      + darkKhaki : SolidColor.SolidColor

      - darkMagenta : Color
      + darkMagenta : SolidColor.SolidColor

      - darkOliveGreen : Color
      + darkOliveGreen : SolidColor.SolidColor

      - darkOrange : Color
      + darkOrange : SolidColor.SolidColor

      - darkOrchid : Color
      + darkOrchid : SolidColor.SolidColor

      - darkRed : Color
      + darkRed : SolidColor.SolidColor

      - darkSalmon : Color
      + darkSalmon : SolidColor.SolidColor

      - darkSeaGreen : Color
      + darkSeaGreen : SolidColor.SolidColor

      - darkSlateBlue : Color
      + darkSlateBlue : SolidColor.SolidColor

      - darkSlateGray : Color
      + darkSlateGray : SolidColor.SolidColor

      - darkTurquoise : Color
      + darkTurquoise : SolidColor.SolidColor

      - darkViolet : Color
      + darkViolet : SolidColor.SolidColor

      - deepPink : Color
      + deepPink : SolidColor.SolidColor

      - deepSkyBlue : Color
      + deepSkyBlue : SolidColor.SolidColor

      - dimGray : Color
      + dimGray : SolidColor.SolidColor

      - dodgerBlue : Color
      + dodgerBlue : SolidColor.SolidColor

      - firebrick : Color
      + firebrick : SolidColor.SolidColor

      - floralWhite : Color
      + floralWhite : SolidColor.SolidColor

      - forestGreen : Color
      + forestGreen : SolidColor.SolidColor

      - fuchsia : Color
      + fuchsia : SolidColor.SolidColor

      - gainsboro : Color
      + gainsboro : SolidColor.SolidColor

      - ghostWhite : Color
      + ghostWhite : SolidColor.SolidColor

      - gold : Color
      + gold : SolidColor.SolidColor

      - goldenrod : Color
      + goldenrod : SolidColor.SolidColor

      - gray : Color
      + gray : SolidColor.SolidColor

      - green : Color
      + green : SolidColor.SolidColor

      - greenYellow : Color
      + greenYellow : SolidColor.SolidColor

      - honeydew : Color
      + honeydew : SolidColor.SolidColor

      - hotPink : Color
      + hotPink : SolidColor.SolidColor

      - indianRed : Color
      + indianRed : SolidColor.SolidColor

      - indigo : Color
      + indigo : SolidColor.SolidColor

      - ivory : Color
      + ivory : SolidColor.SolidColor

      - khaki : Color
      + khaki : SolidColor.SolidColor

      - lavender : Color
      + lavender : SolidColor.SolidColor

      - lavenderBlush : Color
      + lavenderBlush : SolidColor.SolidColor

      - lawnGreen : Color
      + lawnGreen : SolidColor.SolidColor

      - lemonChiffon : Color
      + lemonChiffon : SolidColor.SolidColor

      - lightBlue : Color
      + lightBlue : SolidColor.SolidColor

      - lightCoral : Color
      + lightCoral : SolidColor.SolidColor

      - lightCyan : Color
      + lightCyan : SolidColor.SolidColor

      - lightGoldenrodYellow : Color
      + lightGoldenrodYellow : SolidColor.SolidColor

      - lightGray : Color
      + lightGray : SolidColor.SolidColor

      - lightGreen : Color
      + lightGreen : SolidColor.SolidColor

      - lightPink : Color
      + lightPink : SolidColor.SolidColor

      - lightSalmon : Color
      + lightSalmon : SolidColor.SolidColor

      - lightSeaGreen : Color
      + lightSeaGreen : SolidColor.SolidColor

      - lightSkyBlue : Color
      + lightSkyBlue : SolidColor.SolidColor

      - lightSlateGray : Color
      + lightSlateGray : SolidColor.SolidColor

      - lightSteelBlue : Color
      + lightSteelBlue : SolidColor.SolidColor

      - lightYellow : Color
      + lightYellow : SolidColor.SolidColor

      - lime : Color
      + lime : SolidColor.SolidColor

      - limeGreen : Color
      + limeGreen : SolidColor.SolidColor

      - linen : Color
      + linen : SolidColor.SolidColor

      - magenta : Color
      + magenta : SolidColor.SolidColor

      - maroon : Color
      + maroon : SolidColor.SolidColor

      - mediumAquamarine : Color
      + mediumAquamarine : SolidColor.SolidColor

      - mediumBlue : Color
      + mediumBlue : SolidColor.SolidColor

      - mediumOrchid : Color
      + mediumOrchid : SolidColor.SolidColor

      - mediumPurple : Color
      + mediumPurple : SolidColor.SolidColor

      - mediumSeaGreen : Color
      + mediumSeaGreen : SolidColor.SolidColor

      - mediumSlateBlue : Color
      + mediumSlateBlue : SolidColor.SolidColor

      - mediumSpringGreen : Color
      + mediumSpringGreen : SolidColor.SolidColor

      - mediumTurquoise : Color
      + mediumTurquoise : SolidColor.SolidColor

      - mediumVioletRed : Color
      + mediumVioletRed : SolidColor.SolidColor

      - midnightBlue : Color
      + midnightBlue : SolidColor.SolidColor

      - mintCream : Color
      + mintCream : SolidColor.SolidColor

      - mistyRose : Color
      + mistyRose : SolidColor.SolidColor

      - moccasin : Color
      + moccasin : SolidColor.SolidColor

      - navajoWhite : Color
      + navajoWhite : SolidColor.SolidColor

      - navy : Color
      + navy : SolidColor.SolidColor

      - oldLace : Color
      + oldLace : SolidColor.SolidColor

      - olive : Color
      + olive : SolidColor.SolidColor

      - oliveDrab : Color
      + oliveDrab : SolidColor.SolidColor

      - orange : Color
      + orange : SolidColor.SolidColor

      - orangeRed : Color
      + orangeRed : SolidColor.SolidColor

      - orchid : Color
      + orchid : SolidColor.SolidColor

      - paleGoldenrod : Color
      + paleGoldenrod : SolidColor.SolidColor

      - paleGreen : Color
      + paleGreen : SolidColor.SolidColor

      - paleTurquoise : Color
      + paleTurquoise : SolidColor.SolidColor

      - paleVioletRed : Color
      + paleVioletRed : SolidColor.SolidColor

      - papayaWhip : Color
      + papayaWhip : SolidColor.SolidColor

      - peachPuff : Color
      + peachPuff : SolidColor.SolidColor

      - peru : Color
      + peru : SolidColor.SolidColor

      - pink : Color
      + pink : SolidColor.SolidColor

      - plum : Color
      + plum : SolidColor.SolidColor

      - powderBlue : Color
      + powderBlue : SolidColor.SolidColor

      - purple : Color
      + purple : SolidColor.SolidColor

      - red : Color
      + red : SolidColor.SolidColor

      - rosyBrown : Color
      + rosyBrown : SolidColor.SolidColor

      - royalBlue : Color
      + royalBlue : SolidColor.SolidColor

      - saddleBrown : Color
      + saddleBrown : SolidColor.SolidColor

      - salmon : Color
      + salmon : SolidColor.SolidColor

      - sandyBrown : Color
      + sandyBrown : SolidColor.SolidColor

      - seaGreen : Color
      + seaGreen : SolidColor.SolidColor

      - seashell : Color
      + seashell : SolidColor.SolidColor

      - sienna : Color
      + sienna : SolidColor.SolidColor

      - silver : Color
      + silver : SolidColor.SolidColor

      - skyBlue : Color
      + skyBlue : SolidColor.SolidColor

      - slateBlue : Color
      + slateBlue : SolidColor.SolidColor

      - slateGray : Color
      + slateGray : SolidColor.SolidColor

      - snow : Color
      + snow : SolidColor.SolidColor

      - springGreen : Color
      + springGreen : SolidColor.SolidColor

      - steelBlue : Color
      + steelBlue : SolidColor.SolidColor

      - tan : Color
      + tan : SolidColor.SolidColor

      - teal : Color
      + teal : SolidColor.SolidColor

      - thistle : Color
      + thistle : SolidColor.SolidColor

      - tomato : Color
      + tomato : SolidColor.SolidColor

      - turquoise : Color
      + turquoise : SolidColor.SolidColor

      - violet : Color
      + violet : SolidColor.SolidColor

      - wheat : Color
      + wheat : SolidColor.SolidColor

      - white : Color
      + white : SolidColor.SolidColor

      - whiteSmoke : Color
      + whiteSmoke : SolidColor.SolidColor

      - yellow : Color
      + yellow : SolidColor.SolidColor

      - yellowGreen : Color
      + yellowGreen : SolidColor.SolidColor

( Color
, fromRGB, fromHSL, fromHex
, toRGBString, toHSLString
module SolidColor exposing

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would you feel about Color.Solid as a name, exposing Color? I think:

  • it's clear that it's a specialization of Color, in the way that Array.Hamt was a specialization of Array
  • it's a little nicer in the type signatures. import Color.Solid as Solid lets you do Solid.Color.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah! I could see that

orangyReds =
[ orangeRed, tomato, coral, darkOrange, orange ]


allTheButter : List Color
allTheButter : List SolidColor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆

@@ -31,13 +31,13 @@ myHex =
Use helpers like `contrast` and `sufficientContrast` to verify that your font size, boldness, and colors meet accessibility standards.

```

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you be open to a PR to add checks for this with elm-verify-examples?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!! (Although maybe after the major version release has actually occurred in order to not waste your time if this API doesn't make it 😅 )

@ianmackenzie
Copy link

I think I do like the "opaque" and "translucent" naming as suggested in #13 (comment) - so incorporating @BrianHicks' suggestion, maybe have Color.Opaque and Color.Translucent both exposing Color? My only reservation there is that the Elm package web site only shows non-prefixed type names, so it wouldn't be immediately obvious from the signature of a function as shown on the package web site whether it accepted an Opaque.Color or a Translucent.Color.

@tesk9 tesk9 merged commit 86d5d0d into master Jul 3, 2020
@tesk9 tesk9 deleted the fix-namespace-collision-attempt-2 branch July 3, 2020 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants