7
$\begingroup$

How would one do a color separation if there are more than 3 color primaries, or the primaries are nonstandard. In Standard CMYK conversion K is relatively easy conceptually to figure out. Its just a constant value off all the channels.

How would one construct a CMY + orange for instance. Or in the case of a led array with say Red, Yellow, Blue and Violet for example. How would one approach this problem.

I'm fine with a conceptual answer no need to do LAB to end result conversion for example. Though that would be nice.

$\endgroup$

1 Answer 1

5
$\begingroup$

The mathematical approach to this is to represent the other colors/light sources in terms of your standard primaries in the color space. Represent your target color and available light sources as vectors with, say, the RGB color space as the basis. Figuring out how to display your target color using your available sources then becomes a change of basis, a standard linear algebra operation, where the target basis consists of your LEDs/nonstandard primaries.

If the dimensions of the source and destination bases are different, the change of basis matrix won't be square and thus won't be invertible. In that case, you need to solve a system of linear equations, expressed in matrix form:

$$c_{RGB} = [r, y, b, v] \cdot c_{RYBV}$$

Where $c_{RGB}$ and $c_{RYBV}$ are the coordinate vectors of your desired color expressed in terms of RGB and custom primaries, respectively, and $r$, $y$, $b$ and $v$ are your custom primaries (basis vectors) in RGB coordinates.

Solving this system is another common linear algebra operation, and there are a variety of numerical and symbolical algorithms to do so. The system is over-constrained, so solutions will likely have a free variable, however since we can't physically produce negative light, nor do the primaries have infinite dynamic range, for most practical purposes each coefficient will have to be limited to be within the $[0, 1]$ range. This will render many colors unrepresentable under certain sets of primaries.

$\endgroup$
9
  • $\begingroup$ Yes but how do you handle change of basis to dimensions? If i have is a R^3 -> R^4 or R^5 mapping? Anyway yes this will make it work atleast halfway. $\endgroup$
    – joojaa
    Commented Aug 8, 2015 at 20:58
  • 1
    $\begingroup$ I've not had to approach this problem before, but I'm skeptical that this answer will work since color spaces aren't always linear. $\endgroup$ Commented Aug 8, 2015 at 22:39
  • $\begingroup$ Dot product surely will come into play $\endgroup$
    – Alan Wolfe
    Commented Aug 9, 2015 at 2:22
  • $\begingroup$ @jorgeRodriguez you can treat the space linear for max values $\endgroup$
    – joojaa
    Commented Aug 9, 2015 at 4:50
  • 2
    $\begingroup$ MathJax request is in works you should add your post as a reference to this meta post $\endgroup$
    – joojaa
    Commented Aug 10, 2015 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.