RYB Color Compositing
Junichi Sugita

Tokiichiro Takahashi

Tokyo Healthcare University / Tokyo Denki University
Tokyo, Japansugita@vcl.jp

Tokyo Denki University / UEI Research
Tokyo, Japan
toki@vcl.jp(a)

RGB color compositing(b)

RYB color compositing(c)Itten’s RYB color wheel(d)

Stroke compositing
in RYB color space

Fig. 1. Intuitive color compositing

Abstract—This paper introduce an equation to convert from
RGB to RYB and the inverse conversion equation as a model of
RYB color space. Proposal RYB color model allows paint likecompositing easily without complex configuration of parameterssuch as Kubelka-Munk model.
Keywords— RYB; Color; Compositing; Mixing

I. INTRODUCTION
Color compositing is a commonly used operation incomputer graphics. There are two general approach: either
compositing in RGB color space, or physical model using
Kubelka-Munk (KM) theory [1]. However, the former fails toreproduce paint like appearances, while the latter is difficult touse.
Most computer graphics applications make use of the RGB
color space which is defined by the three chromaticities of thered, green, and blue primaries. The RGB color model is anadditive color model (See Fig. 1. (a)). Simple alpha blending inRGB color space maps onto the traditional color compositing
pipeline. However, RGB color compositing fails to reproduce
paint like appearance such as “yellow and blue makes green”.
CMYK is well known color model for subtractive color
compositing used in printing. Similar to RGB, CMYK also
fails to reproduce paint like appearance.
Many people have been used subtractive color model basedon pigment color compositing since early childhood. RYB
color model by Johannes Itten is widely used in art education[2]. Fig. 1. (c) shows Itten’s RYB color wheel. In the RYB
color model, red, yellow and blue are defined as primary colors.

Red and yellow makes orange, yellow and blue makes green,
and red and blue makes purple. Composited three colors get
close to black (See Fig. 1. (b)).
Meanwhile, there is a physical model for compositing
pigments such as that of KM model [3], [4], [5]. The KM
model is able to analytically calculate reflectance andtransparency of scattering materials such as paint pigment.
However, it is difficult to use because the KM model requires
many parameters. In addition, KM model has the limitation ofusable colors due to a requirement of predefined pigment
library.
For compositing colors that more closely resemble theexpectations of those not trained in the RGB color space, theRYB color space is thought of as intuitive approach. For thisreason, modelization of the RYB color space on computer isuseful and several application can be expected.
This paper introduce an equation to convert from RGB toRYB and the inverse conversion equation. By converting RYB
color space with the conversion equation, we regain normal useof simple color compositing method in RYB color space, forexample alpha-blending, without complex configuration ofparameters such as KM model. Experimental results verify theeffectiveness of proposal RYB color model.
II. RELATED WORK
There are a number of extensive studies on physicalpigment model to calculate the compositing color for realistic
natural digital media painting system. However, there is few
study on converting color space from RGB to RYB.

Several digital media painting system have used KM modelfor producing composited colors [3], [4], [5]. Baxter et al. [6]proposed a strokes paint system using KM model with anumerical approximation of the same pigments. Curtis et al. [6]used reduced KM model for rendering watercolor. Wang andWang [7] proposed further approximation which uses a single
coefficient variant of KM model. The wax crayon simulation ofRudolf et al. [8] uses simple approximation of KM model.

Here, min() is a function for calculating min value from input
arguments. RYB values, rryb, yryb, bryb, are obtained from rrgb,grgb, brgb by the following equation.
rryb  rrgb  min(rrgb , g rgb )However, KM model is difficult to use because this model
requires many parameters. Moreover, usable colors is limited
to the number of predefined pigment library.

2We normalize the equation (3) as:
 rrryb  ryb
n
(4) yryb yryb  n  0n brybbryb nHere, n is calculated as follows:max( rryb , yryb , bryb )(5)nmax( rrgb , g rgb , brgb )Here, max() is a function for calculating max value from input
arguments.
Finally, black component are added for subtractive color
mixing, and RYB values, Rryb, Yryb, Bryb, are obtained asfollows:

In order to improve the problem, Lu et al. [10] proposed adata-driven model for compositing colors. Although this model
not requires complex configuration of parameters but requires
predefined colors as an input.
Gossett and Chen [11] proposed paint inspired RYB colormodel. As far as we examined, this is the only research toconvert from RGB to RYB. Gossett and Chen defined three
paint pigment primaries and tri-linearly interpolated among
them. However, this model is irreversible conversion, becauseinterpolated color is depend on defined pigment primary colors.
And this paper do not provided clear mechanism for converting
RYB to RGB.
These and other studies provided useful information.
However, the conversion equation from RGB to RYB has notbeen generally provided in the literature.

yryb bryb In this chapter, we describe the method of interconversion
between RGB and RYB color space. Ideal correspondence
values between RGB to RYB show Table 1. The number ofeach RGB or RYB channel ranges from 0 to 1. We propose theconversion equation in agreement with the values of Table 1.
TABLE 1. CORRESPONDING VALUES BETWEEN RGB AND RYB
RGB(0, 0, 0)(1, 0, 0)(0, 1, 0)(0, 0, 1)(1, 1, 0)(1, 0, 1)(0, 1, 1)(1, 1, 1)

RYB(1, 1, 1)(1, 0, 0)(0, 1, 1)(0, 0, 1)(0, 1, 0)(1, 0, 0.5)
(0, 0.5, 1)(0, 0, 0)A. RGB to RYB Conversion
We introduce how to make the conversion from the RGB toRYB color space. Rrgb, Grgb, Brgb are given RGB values as aninput. Whiteness component is removed from Rrgb, Grgb, Brgb by
the following equation.

rrgb  Rrgb  I w
g rgb  Grgb  I w(1)

brgb  Brgb  I w
Here, Iw can be calculated as follows:
I w  min(Rrgb , Grgb , Brgb )(3)

2brgb  g rgb  min(rrgb , g rgb )Rryb  rryb  I b

III. RYB COLOR MODEL

Colorg rgb  min(rrgb , g rgb )Yryb  y ryb  I b(6)

Bryb  bryb  I b
Here, Ib can be calculated as follows:I b  min(1  Rrgb ,1  Grgb ,1  Brgb )B. RYB to RGB Conversion
In this section, we describe the conversion from RGB toRYB. Rryb, Yryb, Bryb are given RYB values as an input.
Whiteness component is removed from Rryb, Yryb, Bryb by thefollowing equation.
rryb  Rryb  I w(8)y Y Irybrybw

bryb  Brgb  I w
Here, Iw is calculated as follows:(9)

I w  min(Rryb , Yryb , Bryb )RGB values, rrgb, grgb, brgb, are obtained from rryb, yryb, bryb by
the following equation.
rrgb  rryb  yryb  min( yryb , bryb )(10)g  y  2 min( y , b )
ryb

ryb

ryb

rybbrgb  2bryb  min( yryb , bryb ) (2)(7)

We normalize the equation (10) as: rrrgb  rgb
n

(11)
 g rgb g rgb  n  0 n brgbbrgb 
n
Here, n is calculated as follows:max(rryb , g ryb , bryb )(12)n
max(rrgb , y rgb , brgb )Finally, black component are added, and RGB values, Rrgb,Grgb, Brgb, are obtained as follows:Rrgb  rrgb  I b

Grgb  g rgb  I b(13)

Brgb  brgb  I b
Here, Ib can be calculated as follows:I b  min(1  Rryb ,1  Yryb ,1  Bryb )show results as luminance = 200. Fig. 2. (c) is brighter than Fig.
2. (a) because RGB is additive color model. On the other hand,Fig. 2. (d) is darker than Fig. 2. (b). It means that the proposed
RYB color model realized subtractive color model.

(a)

RGB (Luminance = 100)(b)

RYB (Luminance = 100)(c)

RGB (Luminance = 200)

(14)

IV. EXPERIMENTAL RESULTS
To verify effectiveness of proposed RYB model, theauthors performed several experiments.
A. Results of Color Compositing
Fig. 1. (b) shows the result using proposed RYB color
model. Composited color Ccomp is calculated from two colors,
C1, C2, by following equation.
(15)
Ccomp  C1  C2
As shown in Fig. 1. (b), we could observe the paint likecompositing such as “yellow and blue make green”.
Fig. 1. (d) shows result of stroke compositing in the
proposed RYB color space. This results used alpha blending
method which is defined by following equation.
(16)
Cblend  C1  1   C2
Cblend is composited color from C1 and C2. α is 0.5 in Fig.
1. (d). As shown in Fig. 1. (d), we could observe the paint likeappearance. By using the proposed RYB color space, weregain normal use of simple alpha blending method forcompositing colors. The proposed RYB color model allows
paint like compositing easily without complex configurationof parameters such as Kubelka-Munk model.
B. Whole context of proposed RYB Color Model
To understand the whole context of the proposed RYB
color model, we converted from RYB to HSL color space. For
comparison, we also converted from RGB to HSL color space.
Fig. 2. shows relationship between hue and saturation in HSLcolor space. The vertical axis is luminance, the horizontal axis
is hue. The number of hue ranges from 0 to 360, saturation andluminance ranges from 0 to 255. Fig. 2. (a) and (b) show
results for the case of luminance = 100. As shown in Fig. 2. (b),we can observe alignment sequence of colors that same as
RYB color wheel (Fig. 1. (c)): that is to say the order of colors
are red, orange, yellow, green, blue, purple. Fig.2. (c) and (d)(d) RYB (Luminance = 200)
Fig. 2. Comparison of hue between RGB and RYB

C. Conversion Error
We calculated the conversion error between RGB and RYB.
The input RGB values used is Table 1. Conversion error was
not observed in the values. It would appear that proposed
equations are invertible conversion.
D. RYB Color Compositing Chart
Color chart is often used in order to observe how different
pigments appear when layered. In this section, we compare avisual appearance between physical chart and composited
chart by proposed model. Fig. 3. (a), (c), (e) show physicalchart in different media which are gouache (Fig. 3. (a)), thinacrylic (Fig. 3. (c)), watercolor (Fig. 3. (e)) respectively. Thesecharts derived from the paper of Lu et al. [10]. In addition tothe Lu’s chart, we also used a chart for serving as an example
of guide available online (Fig. 3. (g)). Color mixing guide
chart is intended for understand in how to mix the colors wesee based on actual tube color combinations.
The results of generated chart by the proposed RYB color
model show Fig. 3. (b), (d), (f), (h). These are results
generated by using alpha blending method in proposed RYB
color space. The alphas α are 0.8, 0.85, 0.6 and 0.5
respectively. There are difference of brightness but it seems
that hue is assigned to almost same category. With the use ofRYB color space, paint like appearance can be realized bysimple alpha blending method.

[8]

C. M. Wang, and R. J. Wang, “Image-based color ink diffusion
rendering,” IEEE Transactions on Visualization and Computer Graphics,
vol. 13, no. 2, pp. 235-246, 2007.
[9] D. Rudolf, D. Mould, E. Neufeld, “A bidirectional deposition model ofwax crayons.” Computer Graphics Forum, vol. 24, no. 1, pp. 27-39,2005.
[10] J. Lu, S. DiVerdi, W. Chen, C. Barnes, and A. Finkelstein,“RealPigment: paint compositing by example,” Proc. of Nonphotorealistic Animation and Rendering ’14, pp. 21-30, 2014.
[11] N. Gossett, and B, Chen, “Paint inspired color mixing and compositingfor visualization” Proc. of IEEE Symp. on Information Visualization ’04,
pp. 113-118, 2004.

(a)Gouache(b)Composited chart (  = 0.8)(c)Thin acrylic(d)Composited chart (  = 0.85)(e)Watercolor(f)Composited chart (  = 0.6)

V. CONCLUSIONSWe proposed an interconversion equation between RGB
and RYB color space. Several experiments verified that thewhole context of proposed RYB color model werecharacterized and precision of interconversion between RGB
and RYB were exhibited. From results of stroke and color
chart compositing, it was also noted that paint likecompositing are realized with the use of RYB color space.
Future work will focus on quantitative evaluation of proposedmodel and comparison to other compositing technique.
REFERENCES
[1]
[2]
[3]

[4]

[5]

[6]

[7]

P. Kubelka and F. Munk, “Ein beitrag zur optik der farbanstriche”, Z.
Tech. Phys.12, pp.593-601, 1931.
J. Itten, “The Art of Color: the subjective experience and objective
rationale of color,” New York, Van Nostrand Reinhold, 1973.
R. S. Berns, and E. R. de la Rie, “The effect of the refractive index of avarnish on the appearance of oil paintings,” Studies in Conservation, vol.
48, no. 4, pp.251-262, 2003.
H. Granberg, and P. Edstrom, “Quantification of the intrinsic error of theKubelka-Munk model caused by strong light absorption,” Journal ofPulp and Paper Science, vol.29, no. 11, pp. 386-390, 2003.
C. Sandoval, and A.D. Kim, “Deriving Kubelka-Munk theory fromradiative transport,” Journal of the Optical Society of America A, vol. 31,
no. 3, pp. 628-636, 2014.
W. Baxter, J. Wendt, and M. C. Lin, “IMPaSTo: a realistic, interactivemodel for paint,” Proc. of Non-photorealistic Animation andRendering ’04, pp. 45-148, 2004.
C. J. Curtis, S. E. Anderson, J. E. Seims, K. W. Fleischer and D. H.
Salesin, “Computer-generated watercolor,” Proc. ofACM
SIGGRAPH ’97, pp. 421-430, 1997.

(h) Composited chart (  = 0.5)(g) Color guideFig. 3. Comparison between physical chart in different media and syntheticcolor compositing chart using alpha blending in our RYB model.