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

A transparent line isn't transparent #40

Open
MarkNijhof opened this issue Mar 20, 2018 · 1 comment
Open

A transparent line isn't transparent #40

MarkNijhof opened this issue Mar 20, 2018 · 1 comment
Labels

Comments

@MarkNijhof
Copy link

I need to be able to show more chart areal then is actually used for the lines/data to show a similar scale to multiple charts. So I found that I could just add a "hidden" line that spans the minimal chart range. So I choose Colors.transparent, but the Color Extra lib is not converting transparent RGB to hex correctly. (alpha is ignored)

colorToHex : Color -> String
colorToHex cl =
    let
        { red, green, blue } =
            toRgb cl
    in
        List.map toHex [ red, green, blue ]
            |> (::) "#"
            |> String.join ""

I was first thinking to make a PR there, but there is not much activity there, and I think this is the only function you use for this lib, maybe worth extracting it directly in your project?

@Janiczek
Copy link

We have (kinda) fixed the problem in elm-color-extra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants