Mixing two RGB color vectors to get resultant

前端 未结 4 1675
粉色の甜心
粉色の甜心 2020-12-06 05:28

I am trying to mix two source RGB vectors to create a third \"resultant vector\" that is an intuitive mix of the first two.

Ideally, I would be able to emulate \"re

4条回答
  •  独厮守ぢ
    2020-12-06 05:44

    I think you should really define what is "+" in your color scheme.

    Based on your requirements, I've translated them into estimated hex color codes, (rgb represention can be deduced easily).

    RED     + BLACK   = DARK RED  
    #ff0000 + #000000 = #800000
    RED     + WHITE   = LIGHT RED
    #ff0000 + #ffffff = #ff8080
    
    optimally, also with real paint characteristics:
    RED     + BLUE    = PURPLE
    #ff0000 + #0000ff = #800080
    RED     + YELLOW  = ORANGE
    #ff0000 + #ffff00 = #ff8000
    

    I do not see a definite pattern which you can work out some formulas to achieve that.

    John's and Nils' methods probably will come close to the colors but probably not to the exact values. I suggest you give theirs a try.

    EDIT:
    Updated the wrong color codes. Well it does made a lot more sense now.

提交回复
热议问题