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

Red color not working #6

Closed
thesandlord opened this issue Mar 6, 2015 · 2 comments
Closed

Red color not working #6

thesandlord opened this issue Mar 6, 2015 · 2 comments

Comments

@thesandlord
Copy link
Contributor

I'm having some issues with the colors being generated.

I am using pure red, #ff0000

When I send in this map as the args:

map[string]string{"phrase": "abc", "generator": "xes", "color": "#ff0000"}

I am getting back this SVG:
screen shot 2015-03-05 at 6 25 14 pm

Raw SVG string:
http://pastebin.com/A4R6mpnh

When I try these two:
map[string]string{"phrase": "abc", "generator": "xes", "color": "#ff2211"}
map[string]string{"phrase": "abc", "generator": "xes", "color": "#aa2211"}

The output image is exactly the same.

Basically, it looks like it is completely ignoring the Red. Blue and Green seem to work fine.

@thesandlord thesandlord changed the title Colors not working right Red color not working Mar 6, 2015
@thesandlord
Copy link
Contributor Author

Just figured it out, looks like a bug in the code:

Line 110 in pattern.go, rgb.R is divided by 2 instead of multiplied by 105 like everything else.

Will submit a pull request

@pravj
Copy link
Owner

pravj commented Mar 6, 2015

Hey @thesandlord,

I just woke up and saw the issue email.
It's weird as I didn't face the issue while generating sample patterns.

Awesome that you figured it out quickly, yeah! send a pull request and I'll plug that in. 👍

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

No branches or pull requests

2 participants