Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How does -color-matrix work and what does "similar to Adobe Flash" mean? I'm looking for a plain mathematical definition. How are the input vector(s), matrix and output vector composed? How is the matrix applied?

share|improve this question
up vote 2 down vote accepted

Plain mathematical definition is it uses matrix multiplication.

Here is an explanation with some examples:

RGBA uses 5x5 matrix and CMYKA uses 6x6, but the idea is the same.

                                     [ A00 A01 A02 A03 A04 ]
                                     [ A10 A11 A12 A13 A14 ]
 [ R' G' B' A' ? ] = [ R G B A 1 ] x [ A20 A21 A22 A23 A24 ]
                                     [ A30 A31 A32 A33 A34 ]
                                     [ A40 A41 A42 A43 A44 ]

? is ignored.

Here is the live matrix to experiment with:

share|improve this answer
Thank you! That's exactly what I was looking for. – artistoex Oct 1 '13 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .