1
votes

Local paint shop can mix any RAL or NCS color I choose but considering the required minimum volume I would be wasting money by throwing unused paint to trash. I have an idea of buying standard pre-mixed opaque acrylic paint colors - blue, red and yellow (RYB primary colors), white (to lighten) and black (to darken) - and I should be good to go.

I can also buy pre-mixed green, orange and violet (RYB secondary colors) to skip mixing primary colors. (There are also other pre-mixed colors like gray and brown but lets ignore them.)

I have a colorimeter and I can measure RGB values of these paint colors.

So, I have defined set of 8 paint colors with known RGB values.

My question is obvious. Is there algorithm that takes desired target RGB color as input and outputs proportional amnounts of source colors? (I believe there is, how would a printer know how to mix CMYK on white paper. OK, dealing with actual paint color is much more complicated than dealing with light mixing because of pigments and different absorbtion and reflection characteristics of paint colors, but anyway...)

Product of mixing suggested proportional amnounts does not have to be (and can´t be) a perfect match with target color, but as close as possible.

Algorithm should optimally use source colors, i.e., it will not mix blue and yellow to get green, but use available green instead.

If I remove green color from defined set, algorithm should use blue and yellow to get green, of course.

If I add already mentioned gray and brown or more colors to defined set, algorithm should use them when neccessary.

Algorithm should not overcomplicate mixing trying to use every available source color even when not neccessary. There should be option to limit number of source colors that can be used. I mean, with 8 source colors I tell algorithm to use only 3 colors and algorithm will choose the best combination to get closest to target color.

Knowing the difference (e.g., in %) between desired target color and expected mixed color would be a nice indicator to have.

Is this possible? If not, I still can manually mix as many colors I need, write down proportions, measure RGB values and create a fix color chart to have consistent results in future. Such algorithm would be great tool to get idea how to start mixing at all.

1
Do they sell sample pots? Very small but might be enough for some purposes.rossum
FYI, there's another question here which seems to cover some of the same ground.500 - Internal Server Error
maybe this Algorithm to find which two colors mix to form a third color (in JavaScript) might help ... however I think you would need to scale the amounts on per paint type basis. Something similar to White balance for RGB so in your case Black or Grayscale Balance. So first I would create few grades of shade and use the used ratios as weight coefficients that will scale the results...Spektre
rossum, no sample pots, 1 liter or 0,2 gallon is the minimum amount.Boris Gereg
500 - Internal Server Error - I have read that before I posted my question. I am unable to apply it to my scenario. Will read it again and again. Spektre - I have read that as well. Yesterday I bought red, yellow, blue, white and black and will get my hands dirty soon. Any other ideas?Boris Gereg

1 Answers

0
votes
  1. you need to have normalized RGB values as input

    that means for any grayscale color R==G==B if not true then you have not normalized RGB space and need to sclae it usually like this:

    R = 0.30*R'
    G = 0.59*G'
    B = 0.11*B'
    

    also hope your colorimeter has its own light source otherwise you need to use specific lighting conditions.

  2. normalized CMYK math

    again for grayscale colors C==M==Y The math conversion from RGB to CMY (assuming 8 bit values) is:

    C = (255 - R)
    M = (255 - G)
    Y = (255 - B)
    

    If you have also Black color then you can apply this:

    K=min(C,M,Y)
    C-=K
    M-=K
    Y-=K
    
  3. not normalized CMY

    You just apply scaling similarly like in RGB. The value will depend on your paints. However I am not sure it will be just constant as the paints might interact chemically (just wild guess). If we pretend it is then first do a measurement. Create as good grayscale shade as you can and remember the C,M,Y paint ratios (so volume or weight). Divide the ratios by biggest one (this will normalize the range to <0,1>) and the result are your coefficients that convert non normalized CMY to normalized CMY just by multiplying.