Skip to content

Conversation

@cambridgemike
Copy link
Contributor

I created a new utils directory and put the color conversion methods in there, not sure if that's okay, I could move it back into p5.Color if you'd rather keep it all together.

Adds a bunch of tests for the p5.Color class and for the color conversion methods.

@cambridgemike cambridgemike mentioned this pull request Feb 13, 2015
lmccart pushed a commit that referenced this pull request Feb 16, 2015
move color conversions into utility file, add tests for color
@lmccart lmccart merged commit e689649 into processing:master Feb 16, 2015
@ghost
Copy link

ghost commented Mar 7, 2015

I'm trying to set pixels on an image with the var returned from color() but it won't take. The set method only works for me if I get() a pixel from an image loaded from a file, and use that to set a pixel in the new image. I can change the values in the pixel array but would prefer to not have to load an image to get the right data structure (from img.get())

Any advice on how to set a pixel in an image with color() is appreciated!

Using the latest p5.js download...

Sent from my iPhone

On Feb 16, 2015, at 6:46 AM, Lauren McCarthy notifications@github.com wrote:

Merged #541.


Reply to this email directly or view it on GitHub.

@cambridgemike
Copy link
Contributor Author

Could you provide sample code?

@ghost
Copy link

ghost commented Mar 9, 2015

Actually this is working for me now with the latest release... :)

Sent from my iPhone

On Mar 6, 2015, at 4:47 PM, Stuart Rose srose76@gmail.com wrote:

I'm trying to set pixels on an image with the var returned from color() but it won't take. The set method only works for me if I get() a pixel from an image loaded from a file, and use that to set a pixel in the new image. I can change the values in the pixel array but would prefer to not have to load an image to get the right data structure (from img.get())

Any advice on how to set a pixel in an image with color() is appreciated!

Using the latest p5.js download...

Sent from my iPhone

On Feb 16, 2015, at 6:46 AM, Lauren McCarthy notifications@github.com wrote:

Merged #541.


Reply to this email directly or view it on GitHub.

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.

2 participants