Volume 35 (2016), Number 7

Pacific Graphics 2016
E. Grinspun, B. Bickel, and Y. Dobashi(Guest Editors)

Supplemental Material:
Aesthetic Rating and Color Suggestion for Color Palettes
N. Kita and K. Miyata
Japan Advanced Institute of Science and Technology, Japan

Appendix A: Proposed Algorithm
The algorithms proposed in Section 4 of the main paper are given
below.

Basic feature (BF). Basic statistics, i.e., Mean, StdDev, Median, Max, Min, and MaxMinDiff, for each of the three dimensions of a color space are extracted. For the BF vector, 72 features
are extracted.

Algorithm 1 Suggesting Compatible Colors
1: procedure C OMPATIBLE C OLORS(palette t, index k, #cands Ncand ,#samples Nsample , threshold (τ, κ))
2:. Sampling candidate’s HSVs
3:
f ← C OMPUTE H UE P ROBABILITY(t, k) . Eq. 3 or Eq. 4
4:hi ← S AMPLING F ROM H UE P ROB( f , Nsample )5:si ∼ N (µs , σs ) . §4.2
6:vi ∼ N (µv , σv ) . §4.2
7:
. Compute rating
8:
for i = 1 → m do
9:ci ← (hi , si , vi )10:
Cicand ← C OMPATIBLE C ANDIDATES(t, ci , τ) . Eq. 2
11:
end for
12:
C ← P ERCEPTUALT HRESHOLDING(Ccand , Ncand , κ) . Eq. 5
13:
return C
14: end procedure

Algorithm 2 Sampling from the Hue Probability Distribution
Function
1: procedure S AMPLING F ROM H UE P ROB(function f , #samples n)2:
H ← ∅ . initialize a set that holds accepted hue samples
3:
for i = 1 → n do
4:
. Rejection sampling from f
5:hi ← R ANDOM I NTEGER [0,360] . Select a hue value
6:ui ∼ U[0,max f ]7:if ui ≤ f (hi ) then8:
H ← H ∪ {hi }9:end if
10:
end for11:
return H . Out of n samples, m accepted hue samples are returned
12: end procedure

Plane feature (PF). A 2D plane is fitted to 3D color coordinates
using PCA in RGB, CIELAB, and CHSV color spaces, and Normal, Variance, and SSE are computed as the plane features.
Twenty-one features are extracted for the PF vector.
HSV feature (HsvF). In HSV color space, we extract the Mean,
StdDev, Min, Max, LogMean, LogStdDev, LogMin, andLogMax features from the hue probability of color c; pc . We also
extract these features from the hue adjacent probability of colors b
joint
adjand c; pbc and the hue joint probability of b and c; pbc . Here pc
adj

is the percentage of colors in training palettes with hue c, pbc isjoint
the percentage of adjacent colors b and c, and pbc is the percent-age of colors b and c in the same palette. Twenty-five features areextracted for HsvF.
In addition, we extract the hue entropy, which is defined as aprobability distribution p(θ) computed using the hues of a given
palette comprising n colors as a mixture of von Mises distribution,i.e., p(θ) ∝ ∑ni=1 exp(2π cos(θ − θi )).
Additional feature (CH and Grads). In addition to the above 118
features, we also extract three additional features. The first feature
is Color Harmony (CH) [OL06]. The process to calculate CH isgiven in Appendix D. The other features are lightness and hue gradation (Grads), according to the analysis described in Appendix
E. We compute linear regressions in ascending/descending orderof colors in a palette, and the resulting R2 values are used as thegradation features. In total, we extract 121 features from a givenpalette.

Appendix B: Feature Extraction
We extract the following features from a given palette. The basic,plane, and HSV features are derived from those used in [OAH11].
Color space. We extract the features of a given palette from RGB,CIELAB, HSV, and CHSV color spaces.
c 2016 The Author(s)Computer Graphics Forum c 2016 The Eurographics Association and John
Wiley & Sons Ltd. Published by John Wiley & Sons Ltd.

Appendix C: Model Analysis
A detailed analysis of the contributions of each feature extracted
from a given palette is shown in Table 1. The results show that BF
has the largest contribution. According to the results, we include allthese features for feature extraction (row 13).

N. Kita & K. Miyata / Supplemental Material: Aesthetic Rating and Color Suggestion for Color Palettes

Table 1: Contributions of each feature (BF, Basic Feature; PF,Plane Feature; HsvF, HSV Feature; CH, Color Harmony; Grads,Gradation).
BF

PF

HsvF

CHGrads

12345678910111213

R value
0.70
0.38
0.270.33
0.14
0.42
0.37
0.71
0.51
0.71
0.71
0.72
0.72

tendency as lightness gradation (Fig. 1c); however, no significant
differences were observed for chroma (Fig. 1b).

(a) Lightness(b) Chroma(c) Hue

Figure 1: Histogram of #palette of (non-)gradations in the dataset

We also analyzed the quality of linearity of the lightness gradation. We split the dataset to lower-/middle-/higher-rated groups.
Each group had 1, 000 palettes. Then, all the palettes in the groupwere plotted and linear regression was computed (Fig. 2). The boldblue and red lines are the fitting results. From the R2 value, it canbe observed that linearity tends to increase as the ratings increase.
Therefore, we include the gradation term in the feature extraction
method.

Appendix D: Two-color Harmony Model
Ou et al. proposed the following two-color harmony model basedon the results of a user study [OL06]:

CH = HC + HL + HH ,(1)(a) Low-rated(b) Mid-rated(c) High-rated

Figure 2: Linearity of lightness gradation.

where HC , HL , and HH are the terms related to chroma, lightness,and hue, respectively, calculated by the following equations.
HC = 0.04 + 0.53 tanh(0.8 − 0.045∆C)1∗ 2∗∆C = [(∆Hab) + (∆Cab/1.46)2 ] 2

HL = HLsum + H∆LHLsum = 0.28 + 0.54 tanh(−3.88 + 0.029Lsum )in which Lsum = L1∗ + L2∗
H∆L = 0.14 + 0.15 tanh(−2 + 0.2∆L)in which ∆L = |L1∗ − L2∗ |HH = HSY1 + HSY2
HSY = EC (HS + EY )EC =HS =∗0.5 + 0.5 tanh(−2 + 0.5Cab)−0.08 − 0.14 sin(hab + 50◦ ) − 0.07 sin(2hab + 90◦ )∗, and hab are the lightness, chroma, and hue values
Here L∗ , Cab
in the CIELAB color space, respectively. We calculated CH as afeature for all combinations of colors in a given palette.

References[BPCD11] B YCHKOVSKY V., PARIS S., C HAN E., D URAND F.: Learning photographic global tonal adjustment with a database of input / output image pairs. In The Twenty-Fourth IEEE Conference on Computer
Vision and Pattern Recognition (2011).
[CFL∗ 15] C HANG H., F RIED O., L IU Y., D I V ERDI S., F INKELSTEIN
A.: Palette-based photo recoloring. ACM Trans. Graph. 34, 4 (July2015), 139:1–139:11. URL: http://doi.acm.org/10.1145/2766978, doi:10.1145/2766978.
[OAH11] O’D ONOVAN P., AGARWALA A., H ERTZMANN A.: Color
compatibility from large datasets. ACM Trans. Graph. 30, 4 (July 2011),
63:1–63:12. URL: http://doi.acm.org/10.1145/2010324.
1964958, doi:10.1145/2010324.1964958. 1, 2
[OL06] O U L.-C., L UO M. R.: A colour harmony model for twocolour combinations. Color Research & Application 31, 3 (2006), 191–
204. URL: http://dx.doi.org/10.1002/col.20208, doi:
10.1002/col.20208. 1, 2

Appendix E: Gradation Analysis
We analyzed whether a color palette in the [OAH11] dataset
displays linearity in the order of colors. We counted the lightness/chroma/hue gradation of a palette for all palettes in the dataset
to determine if the order of colors decreases (increases) monotonically in the palette’s line plot (Fig. 1). A palette with lightness
gradation tends to obtain a higher rate than those without lightness
gradation (Fig. 1a). As can be seen, hue gradation has the samec 2016 The Author(s)Computer Graphics Forum c 2016 The Eurographics Association and John Wiley & Sons Ltd.