Jump to content

Mixing RGB color values


silvercover

Recommended Posts

What do you mean by "mix all of them"?  You mean you want to come up with a color consisting of blending all those colors? Kind of a meaningless task since the outcome is probably going to be #ffffff anyway.  Think about it.  What if you took 50 buckets of paint and put them all in a vat.  What would it look like?

 

What way would you take 50 six digit numbers and mix them up?  Take a sum?  Or maybe take each in 2-digit pairs and average them to get some kind of approximation of the same color (r,g,b) ?

Edited by ginerjm
Link to comment
Share on other sites

It's not going to be as easy as getting the average of the two colors.  You're going to have to convert to something like CMYK/HSL/HSV and so on, perform some extremely complex algorithms, and get a result that you would then convert back to RGB. (hex)

 

Your best bet, and easiest alternative without re-inventing the wheel is to find a jQuery plugin that can do it for you, such as this one

http://www.xarg.org/project/jquery-color-plugin-xcolor/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.