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

Hex colors / 'web colors' next to each other fail to parse in certain situations #4752

Techy4198 opened this Issue Nov 24, 2016 · 0 comments


None yet
2 participants

Techy4198 commented Nov 24, 2016

If two hexadecimal colors are separated by only a comma or colon (maybe other valid separators), without a space either side, the result is Error on "Invalid Character".
Code snippets to test:

lerpColor(#000000,#FFFFFF,0.5); //Fails
lerpColor(#000000,  #FFFFFF,0.5); //Works
lerpColor(#000000  ,#FFFFFF,0.5); //Works
fill(mousePressed?#000000:#FFFFFF); //Fails
fill(mousePressed?#000000:  #FFFFFF); //Works
fill(mousePressed?#000000  :#FFFFFF); //Works

JakubValtar added a commit to JakubValtar/processing that referenced this issue Nov 24, 2016

Fix hex color regex
Same problem as with type constructors #4744

Fixes #4752

@JakubValtar JakubValtar self-assigned this Nov 24, 2016

@benfry benfry closed this in #4753 Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment