A note on the algebra of colors (and other sense data) Athanassios Tzouvaras Dept. of Mathematics, Univ. of Thessaloniki, 541 24 Thessaloniki, Greece e-mail:[email protected] Abstract Using the fact that all colors are generated from three basic ones, which are independent, we can identify the set of colors to the structure R+3 with ordinary addition and scalar multiplication. Using some standard facts from the geometry of R3 it is shown that: (a) If a color is producible as a mixture of any number of other colors, then it is producible by at most three of them. (b) For any k > 0, there are k independent colors, i.e., none of them is producible as a mixture of the rest. 1 Some basic facts about colors It is well known that the shades of all colors of the world are numerous (practically infinite), but all can be produced as mixtures of three basic ones: Red (R), Green (G) and Blue (B). They correspond to certain radiation frequencies of the visible spectrum. A material substance receives red, green and blue radiation and, depending on the energy states of its atoms, it absorbs some them and emits the others. E.g. a red substance absorbs the green and blue radiation, and emits the red one, while a yellow substance absorbs the blue and emits the red and the green. So yellow is a derivative color and we may say that, concerning radiations, yellow=red+green. The following table contains the basic derivations from the basic colors: 1 color (frequency) of radiation red green blue 1 1 1 1 1 0 1 0 1 1 0 0 0 1 1 0 0 1 0 1 0 0 0 0 color of substance white yellow reddish (magenta) red cyan blue green black (1 means emission, 0 means absorbtion) Table 1 For example, the fifth row of the Table says that if a substance absorbs all red radiation and emits all green and blue one, then its color will be cyan. It follows that there are two complementary ways to look at colors: Either as forms of light radiation of certain frequencies, or as visual properties of material objects, which are due to selective absorbtion and emission of light radiation. The first system is usually referred to as additive system, and the latter as subtractive system. The additive system is used in image processing, TV screens etc, while the subtractive system is used in painting, printing, drawing etc. Structurally the two approaches are almost identical. They simply give rise to different basic colors and different generations. For example in the radiation approach, the basic colors are those we considered above, i.e., the red, the green, and the blue (yellow is derivative: green+red), the mixture of the three produces white (the well-known rainbow phenomenon of the analysis of white light into its constituents ) and the absence of all produces black. In contrast, in the absorbtion approach, the basic colors are the red, the yellow and the blue (green is now derivative: yellow+blue) the mixture of which produces black. White is not producible by the above three, so we must add it as a fourth basic color. In this article we follow the additive system, which is more fundamental and simpler, since no fourth color is needed. Let C be the set of all colors. Not only R, G, B generate all elements of C, but moreover, none of the R, G, B can be produced as a combination of the other two. Therefore R, G, B look like a basis of a vector space, where 2 the elements of a basis exhibit these two characteristics: (a) They generate the space and (b) they are linearly independent. But there are important differences: Only nonnegative reals can be used in the combinations of the basic colors, and only the proportions between these scalars are taken into account, not the scalars themselves. As a result, the operation of “adding” colors, i.e., mixing them up, is irreversible (that is, an ingredient of the mixture cannot be regained by “subtracting” from the mixture the other ingredients). Hence no group structure exists. C is just an additive semigroup with a neutral element. Let us come to our formalism. We use capital letters X, Y, Z, X1 · · · ranging over colors and lowercase letters a, b, c, k, . . . ranging over (nonnegative) real numbers. Let R+ be the set of positive reals and R+ 0 be the set of nonnegative reals. We assume two basic operations on C: An “addition” and a multiplication by scalars. Namely for every X, Y ∈ C and every a ∈ R+ , X + Y and a · X, or just aX, are elements of C. Intuitively, + corresponds to mixing, while the multiplication aX corresponds to “intensifying” (whenever other colors are present). Some obvious properties of + and · are accepted: (1) (2) (3) (4) (5) + is commutative and associative. a(bX) = (ab)X. 1 · X = X. (a + b)X = aX + bX. a(X + Y ) = aX + aY . In terms of + and ·, the nontrivial derivations of Table 1 above are rewritten as follows: white = R+G+B yellow = R+G+0V = R+G reddish = R+0G+B = R+B cyan = 0R+ G+B = G+B black = 0R+0G+0B = We see that black is the absence of any color, and we shall denoted by 0, since X + 0 = X for any X ∈ C. (Of course this holds only for radiations, not for colors of substances, where black is heavily non-neutral.) 3 What is the meaning of aX? Although we follow the radiation approach we can think of colors as visual impressions produced by substances, e.g. paints. So if X represents a drop of a paint of color X, then 2X represents two drops of this paint and it is clear that the visual impression caused by one drop in no different (as such and not in contrast e.g. with the background) from the impression caused by two drops. Therefore X and 2X, and in generally aX for any a ∈ R+ , are equivalent, denoted X ∼ 2X ∼ aX. On the other hand, mixing one drop of X-paint with one drop of Y -paint produces a different impression than mixing four drops of X-paint with one drop of Y -paint, that is X + Y 6∼ 4X + Y . Here the scalar 4 acts indeed as an intensifier making the impression caused by X stronger compared to that of Y . On the other hand it is clear that we should have X + Y ∼ 4X + 4Y ∼ aX + aY ∼ a(X + Y ). The above simply says that the outcome of color mixing depends only one one thing: The quantitative analogy of the ingredients. To put it formally we define an equivalence relation ∼ in the space C as follows. Definition 1.1 For any X, Y ∈ C, let X ∼ Y iff Y = aX for some a ∈ R+ . Clearly ∼ is an equivalence relation. Given X1 , . . . , Xn ∈ C, for any a1 , . . . , an ≥ 0, the combination Σi ai Xi = a1 X1 + · · · + an Xn is a color. Let P os(X1 , . . . , Xn ) = {Σi ai Xi : ai ≥ 0} be the positive hull of X1 , · · · , Xn . Lemma 1.2 Let X1 , . . . , Xn ∈ C be distinct, and let Y = Σi ai Xi and Z = Σi bi Xi be two elements of hX1 , . . . , Xn i. Then Y ∼ Z iff for all i, j ≤ n, ai = 6 0 ⇐⇒ bi 6= 0 and ai /aj = bi /bj . Proof. Let the condition hold. Without loss of generality suppose all ai are 6= 0. Then so are bi and for any two i, j, ai /aj = bi /bj , or ai /bi = aj /bj , for all i, j. If c = ai /bi , then Y = Σi cbi Xi = cΣi bi Xi = cY , that is Y ∼ cZ. The converse is similar. a Note that ∼-equivalent colors are not substitutable in combinations. Namely, X ∼ Y 6⇒ (X + Z) ∼ (Y + Z). In view of the equivalence ∼, given 4 X1 , . . . , Xn , instead of the elements of the positive hull P s(X1 , . . . , Xn ) we may consider only the combinations a1 X1 + · · · + an Xn such that ai ∈ R+ 0 and a1 + · · · + an = 1, i.e. the convex hull of X1 , . . . , Xn , Conv(X1 , . . . , Xn ) = {Σi ai Xi : ai ≥ 0, Σi ai = 1}. Indeed, obviously, Conv(X1 , . . . , Xn ) ⊆ P os(X1 , . . . , Xn ). Conversely if X = a1 X1 + · · · + an Xn is an element of P os(X1 , . . . , Xn ) and a = Σi ai , then a−1 X ∼ X and a−1 X ∈ Conv(X1 , . . . , Xn ). To sum up: Using the colors {R, G, B} as a basis, the set C of colors can be identified with the subset R+3 = {(a1 , a2 , a3 ) : ai ≥ 0} of nonnegative triples of reals. Addition and scalar multiplication for colors is reduced to the corresponding operations on R+3 , which is a semigroup with unit element (0, 0, 0). Any notion concerning colors, such as convex hull, independence, etc, is better studied in the abstract context of R+3 or R+d in general, so we recall certain properties and facts of R+d . 2 Notions from euclidean spaces Let Rd be the d-dimensional euclidean space. Bared letters x, y, . . . denote vectors, i.e., elements of Rd , while x, x1 , a, a1 . . . denote elements of R. For the following definitions and facts the reader is referred e.g. in [2]. Given X = {x1 , . . . , xk } ⊆ Rd , we let hXi = {Σi ai xi : ai ∈ R} be the linear hull of X, Af f (X) = {Σi ai xi : Σi ai = 1} be the affine hull of X, and Conv(X) = {Σi ai xi : ai ≥ 0 and Σi ai = 1} be the convex hull of X. Note that there is an alternative definition of convex hull. Namely, given x, y, the line segment [x, y] determined by x, y, is defined to be the set 5 {ax + (1 − a)y : 0 ≤ a ≤ 1}. A set Y ⊆ Rd is said to be convex if for any x, y ∈ Y , [x, y] ⊆ Y . Then the convex hull of X can be alternatively defined as the intersection of all convex sets that include X. The equivalence of the two definitions, proved in [2], p.15, is referred to as “Carathéodory’s theorem”. In fact Carathéodory’s theorem says more. Theorem 2.1 (Carathéodory) Let X be any subset of Rd . If x ∈ Con(X) then there are at most d vectors xi ∈ X, i ≤ d, and ai ≥ 0 such that Σi ai = 1 and x = Σi ai xi . Corollary 2.2 Let X1 , . . . , Xk be k colors of C. If X is a combination of Xi , i ≤ k, then X is a combination of (at most) three of them. Proof. By the remarks at the end of the last section, X can be taken to be in the convex hull of X1 , . . . , Xk . Also C can be identified with R+3 , so apply the previous theorem for d = 3. a Further let P os(X) = {Σi ai xi : ai ≥ 0} be the positive hull of X. Definition 2.3 x1 , . . . , xk are said to be positively dependent if for some i ≤ k, xi ∈ P os(X − {xi }). Fact x1 , . . . , xk are positively dependent iff for some i ≤ k and some a > 0, axi ∈ Conv(X − {xi }). Proof. Let x1 , . . . , xk be positively dependent. Then for some i ≤ k, there are aj ≥ 0 such that xi = Σj6=i aj xj . If a = Σj6=i aj , then a−1 xi = Σj6=i bj xj , where bj ≥ 0 and Σj6=i bj = 1, hence a−1 xi ∈ Conv(X − {xi }). Conversely, let axi ∈ Conv(X − {xi }) for some i ≤ k and some a > 0. Then axi = Σj6=i bj xj , where bj ≥ 0 and Σj6=i bj = 1. Thus xi = Σj6=i a−1 bj xj , and since a−1 bj ≥ 0, xi ∈ P os(X − {xi }). a By 2.2, if a color is generated by a combination of k other ones, then it is generated by the combination of at most three of them. What about positive 6 independence? Namely, how many positively independent colors can we have in R+3 and more generally in R+d ? Contrary to what happens with ordinary independence, if d ≥ 3, there can be arbitrarily many positively independent vectors. For d = 3 this fact, as well as result 2.1, has an easy geometric explanation. Lemma 2.4 (a) Let d ≥ 3. For every k > 0, there are k positively independent vectors in In R+d . (b) In contrast, at most two vectors of R+2 are positively independent. Proof. (i) We show it for d = 3. The generalization to d > 3 is easy. By Fact above it suffices to find a set X = {x1 , . . . , xk } of k vectors such that for every i ≤ k, and every a > 0, axi ∈ / Conv(X − {xi }). Choose +3 k points in R , x1 , . . . , xk forming the vertices of a convex k-polygon. If X = {x1 , . . . , xk }, then xi ∈ / Conv(X − {xi }), Since all xi are on the same plane, clearly, also for any a > 0, axi ∈ / Conv(X − {xi }). (b) For any three vectors x, y, x, of R+2 , if identified with their position vectors, then one of them, say x, lies between the other two. Then obviously, x is a positive combination of y and z. a Corollary 2.5 For every k > 0, there are k independent colors in C. Lemma 2.6 If {x1 , . . . , xm }, {y 1 , . . . , y n } are positively independent and Conv(x1 , . . . , xm ) = Conv(y 1 , . . . , y n ), then {x1 , . . . , xm } = {y 1 , . . . , y n }. Proof. Let S = Conv(x1 , . . . , xm ). Since {x1 , . . . , xm } is positively independent, {x1 , . . . , xm } is the set of vertices of S, i.e., of the points of S which are not interior in any line segment contained in S. Since S = Conv(y 1 , . . . , y n )), the same holds for the set {y 1 , . . . , y n }. So the two sets are equal. a Corollary 2.7 Let X1 , . . . , Xn be independent colors. Then X1 , . . . , Xn are the only colors generating P os(X1 , . . . , Xn ). 7 References [1] Colors on the web, http://www.webwhirlers.com/colors/coloursphysics.asp [2] B. Grünbaum, Convex polytopes, Interscience Publishers, Purs and Applied Mathematics, vol. 16, 1967. 8
© Copyright 2026 Paperzz