# Unifying colors by primes

Light Publishing Center, Changchun Institute of Optics, Fine Mechanics And Physics, CAS

Isaac Newton’s theory of light indicates that all colors can be generated from three basic colors: red, green, and blue. RGB (Red, Green, Blue), a light-color structure that contains 3×256 values of letter symbols, and CMYK (Cyan, Magenta, Yellow, Key black), a pigment-color structure that contains 4×100 values of letter symbols, are the two most used color frames. Other color frames such as HSV (Hue, Saturation, Value) are derived from RGB and CMYK.

In the RGB frame, each of the basic colors, encoded as coded as (r, g, b), has 256 values [0, 1, 2, …, 255]. In the CMYK frame, each of C, M, Y and K, encoded as (c, m, y, k) has 100 values. While the two frames are widely adopted, they exhibit disadvantages or inconvenience for some application contexts: (1) Expression problems: R, G, B and C, M, Y, K are letter symbols; it is hard to use them to explicitly express the relationship between colors. Difficulties arise in various application contexts without a specific mechanism for mathematical operations. For instance, what is the complement color of R? What are the triad-complementary pairs within the 12 colors of {R, G, B, RY, Y, YG, GC, C, CB, BM, M, MR}? (2) Computing problems: Letter symbols in the current color frames are hard to use for color computation. For instance, what is the resulting color after blending the four colors of {RY, GC, CB, MR}? (3) Unification problems: Letter symbols are difficult to use for unifying the RGB, CMYK, and HSV frames together. Such issues may cause ineffective conversions among different colors. (4) Size problems: Each of c, m, y, and k may assume 100 values, while each of r, g, and b may assume 256 values. It is challenging to distribute and allocate these many colors and hues on a color wheel, and the large number of color values may cause a huge computational burden for combining some of them to generate preferred colors.

In this study, we present a new color framework C235 based on the prime number theory and Goldbach’s conjecture to encode colors and colorize objects. The C235 color system uses the first three prime numbers 2, 3, and 5 to represent the three basic colors of red, green, and blue, respectively. In this color frame, code is for red color, for green color and for blue color. Consequently, code = is for color yellow (Y), code = is for color cyan (C), code = is for color yellow-green (YG), and code = is for color cyan-green (CG). A color in the C235 system is also associated with a gray level for its lightness/thickness. Since = represents a white light, we use the powers of 30 (such as 301, 302, 303, ⋯) to indicate the grayness levels. General rule is that a higher power means a darker/thicker color.

Fig. 1 shows a basic C235 color system of 36 hues/colors with 3 gray levels organized in 3 rings and 12 sectors – the inner circle has 3 gray codes (such as 301, 302, and 303, ⋯) surrounded by 36 hues/color codes (such as 2, 3, 5, 6, 12,32, and 2253) spreading in 3 rings that belong to the 12 sectors (such as R, Y, G, RY and YG) outside the big circle. This C235 system makes plotting a specific color more convenient. For instance, ×30> = ×2×3×5> represents a color composed of hue located in the first ring with a gray level that belongs to the R sector. Hence it is “light red”.

Color wheel is a powerful tool for displaying and manipulating colors. However, the RGB wheel and CMYK wheel are not effective enough for the following reasons: Firstly, an RGB wheel contains 3×2562 color hues and a CMYK wheel contains 3×1002 hues. The number of hues is too large for manipulating or displaying colors. Secondly, CMYK and RGB need 3×256 and 4×100 values, respectively, for representing colors. Thirdly, the CMYK wheel and RGB wheel are not interchangeable. We design a compressed color wheel, called C235 wheel, which may integrate the CMYK and RGB wheels with the compression error rate less than 1.2%. The compressed C235 wheel is designed to unify CMYK, RGB, and HSV color systems using a much smaller number of raw colors (key values) to represent all 2563 colors as illustrated in Fig. 2.

The C235 system facilitate potential practical applications in various areas. We consider LCD (Liquid Crystal Display) technology as an example. Most such involved displays in cellular phones and TVs use LED as the light source. A typical LED is fed with pulsed high currents for a short period of time using the pulse width modulation (PWM) technique to create modulated electronic pulses of the desired width1. Interestingly, the C235 color system allows users to conveniently merge lights and colors and facilitates the design of smart lighting systems by adjusting users’ preferences. In fact, such a system can be widely used in fashion shows, painting exhibitions and commodity displays. Suppose there is a natural light 2a23a35a5 irradiating on an apple. The reflecting light 2b23b35b5 is the apparent color of the apple. By adding an additional light 2c23c35c5 to irradiate this apple, a preferred color can be visualized, as illustrated in Fig. 3. The computation of the resulting color can be easily carried out through the C235 system. Moreover, the number of pulse widths generated for PWM can be optimized, thus achieving an optimal design of LED systems with a lower energy consumption.

In general, the proposed C235 color framework works much more efficient for encoding, computing, and unifying colors than the existing RGB and CMYK frames. By utilizing Goldbach’s conjecture, this study shows a novel way to compress the RGB color wheel into a much smaller C235 wheel, alleviating the size problem noted with the current RGB frame. Furthermore, we show that the proposed C235 color frame can be readily adopted for colorizing any objects with multiple attributes, designing LCD light systems, and coloring DNA codons.

References

1. Ulrich, L. Bosch’s smart visor tracks the sun while you drive. IEEE Spectrum. https://spectrum.ieee.org/boschs-smart-virtual-visor-tracks-sun (2020).

/Public Release. This material from the originating organization/author(s) may be of a point-in-time nature, edited for clarity, style and length. The views and opinions expressed are those of the author(s).View in full here.