![]() Цвет Форумы / Беседа цвета / Советы и критика
Не уверены, какой цвет использовать в проекте, над которым работаете? Спросите совета. how do you compare two colors?
![]() ![]() xcolwell xcolwell написал: 4 Апр, 2008
hi color lovers! Here's a pretty open-ended question: if I gave you two colors, how would you compare how similar they are? I'd love if there was a numeric way to do this, i.e. not "eyeball". Brien ![]() ![]() ![]() Just Perf… Just Perfect Color написал: 4 Апр, 2008
xcolwell wrote: hi color lovers! There is a numeric way but compare in what manner? And for what reason? Color spectrometers have been used for ages, and long before CMYK, RGB etc. to grab the subjectivity of color and comparisons away from eyeballing. Years ago I consulted in the dental industry and those making artificial teeth had these machines that would kick back numbers so that a new tooth would match old ones, save for coffee, wine, etc. stains. New ones did not have natural translucence. Light and color go together. With too much all is white. With too little all is black. It doesn't mean the color went away, we just cannot see it. A friend worked for a company that developed at least a first approach to measuring pollution in third world countries by putting colorful glowing bugs in a machine that read their color and illuminence. The Pantone printer's guide is numerical. I am intrigued? Why the question? There was a color math group started some time ago. I have been away for awhile. ![]() ![]() ![]() ZicoCario… ZicoCarioca написал: 4 Апр, 2008
xcolwell wrote: hi color lovers! Well, here's a pretty open-ended answer... Generally, I can see there's a colour at the right and another at the left... That's the first and maybe the most important difference... ;-) ![]() ![]() xcolwell xcolwell написал: 4 Апр, 2008
hehe, sorry my question is so mysterious. Thanks for having fun with it. Practically, I want to cluster a set of colors into N clusters, and I need to define some metric. That's my main motivation. Over dinner I was thinking about how I would walk through the an RGB color cube There are other questions that could be answered with some kind of numerical thinking of colors ... e.g. if I want to label M values, give me a set of colors that best contrast ... ![]() ![]() ![]() LaskoVort… LaskoVortex написал: 5 Апр, 2008
Good question! There are lots of ways to specify a color and each has their dimensionality. The RGB colorspace, for example has three colors, making a 3d space. One quantitative way would be to calculate the euclidian distance. For example if color 1 is (r1, g1, b1) in and color 2 is (r2, g2, b2), then you can calculate the euclidian distance between the two colors by taking the square root of the quantity [(r2-r1)*(r2-r1) + (g2-g1)*(g2-g1) + (b2-b1)*(b2-b1)]. For example, lets pick two sets of colors from the highly ranked and very beautiful Winter Break pallet. Using this method, comparing Break yellow and Break green gives a distance of 63.98. However, for the more dissimilar looking colors of terra cotta and Break green, the euclidian distance is 180.39. So even crude color comparison like this can be quite scientific and give reasonable results. However, comparisons based on a metric like euclidian distance assumes that the rgb colorspace is orthogonal, homogenous, and linear in all three dimensions. These assumptions are subject to the composition of one's photoreceptors and to the method of translating these values into electromagnetic radiation. ![]() ![]() ![]() Hair Colo… Hair Color for Cats написал: 5 Апр, 2008
I worked all this out once and used Mathematica. Get over it. You cannot, even though it would be convenient, digitize human and subjective perception of analog things like musical tone, color spectrum, and so forth. First of all there is no common starting point. Human choirs would not exist if there was one tonal voice and we all could hold a tune, as they say. It is the same with color. You pick starting point as you would with a piano tuning fork and then you get on with it. Genetically, you either sing Soprano, Alto, Tenor, or Bass. It changes instantly the next time you see something. When it comes to color. ![]() ![]() xcolwell xcolwell написал: 8 Апр, 2008
hi all, thanks for entertaining my question. I like all the angles here. I was thinking about walking the color cube that night, and I wrote a simple OGL renderer to visualize an Eulerian walk through the color cube. Maybe it's another angle. http://resisttheb.org/cg/archives/133 Regards ![]() ![]() ![]() manekinek… manekineko написал: 8 Апр, 2008
Hair Color for Cats wrote: I worked all this out once and used Mathematica. Sure you can, these are similar both digitally and using human perception: ![]() ![]() You don't need a common starting point, all you need is a common interval range ![]() ![]() ![]() terriann terriann написал: 9 Апр, 2008
Hair Color for Cats wrote: I worked all this out once and used Mathematica. I agree that you can't digitize perception but I don't see why you can't mathematically calculate similarity. You'd need a point of reference in which to reference it by but colors especially on computers are nothing but numbers. Just convert a pair of color's Hex -> RGB - >HSV and calculate the difference between hue, saturation and value then compare that difference (or range) to another set and there would be some way to compare similarities. It wouldn't be a spot on exact science but I'm sure it wouldn't be impossible to work out something logical to play with. ![]() ![]() xcolwell xcolwell написал: 9 Апр, 2008
One of the major sticking points seems to me that (rgb) (64, 64, 64), (128, 128, 64), and (64, 128, 128) are all equidistant in RGB space, but if you asked most people to order these colors, I bet the gray would most always fall in the middle. There are notions of contrast and neutrality that a simple euclidean metric doesn't capture. To more accurately model distance, I think you would have to consider psychological and gestalt properties, i.e. the location of the color relative to other colors, etc. I agree though that approximations are great for us to move forward with. edit: ugh, I bungled my original point. red and green aren't the same distance as to black. let me fix this in a sec. ![]() ![]() |
![]() ![]() ![]() |
![]() |
































