Aesthetic of Colour: A Machine Learning Approach of Palette
Generation and Aesthetic Classification
Ananya
1a
, Batchu B. V. Aashish
1b
, Kunda Chudanath
1c
, Geetha K N
2
and Shali S
1
1
Dept of Mechanical Engineering, Amrita School of Engineering, Amrita Vishwa Vidyapeetham, Bengaluru,560035, India
2
Dept of Mathematics, Amrita School of Engineering, Amrita Vishwa Vidyapeetham, Bengaluru,560035, India
Keywords: Dominant Colour Extraction, Principal Component Analysis (PCA), Clustering, Support Vector Machine
(SVM), Colour Palette Generation, Aesthetics Classification, Colour Harmony, Computational Design.
Abstract: In this paper, a mathematical and computational framework is developed for the automatic generation of
aesthetic colour palettes from images using Principal Component Analysis, clustering, and Support Vector
Machines. Methodologically, the procedure is started with the key role played by Principal Component
Analysis in extracting colours with the aim of bringing dimensionality reduction while important chromatic
information is preserved. Secondly, the grouping of similar colours and the identification of predominant hues
or common base palettes are achieved using clustering algorithms. Then, the assignment of a retrieved colour
palette to a target aesthetic category is performed through classification by Support Vector Machines, and
further palettes of the same aesthetic are generated. In this way, an avenue is opened for possible application
in design, visual arts, and user interface personalization, enabled by data-driven insights into the quality of
colour harmony and aesthetic perception. Finally, the consistency and aesthetic qualities of the created palettes
over image datasets used are demonstrated through the presentation of experimental results.
1 INTRODUCTION
Colour is an integral part of visual communication
and has a deep effect on emotions, perception, and
decision-making processes. From art and design to
branding and user interfaces, it plays a ubiquitous
role. The choosing of harmonious colour palettes has
traditionally depended on the intuition and experience
of artists and designers, but computational techniques
have now brought the possibility of automating and
refining such a process, hence bridging the gap
between creativity and technology.
Colour aesthetics is the study of principles that
make colour combinations visually appealing and
emotionally resonant. Knowledge of this area is not
only important for making designs appealing but also
for creating engagement and communicating
messages effectively. In a number of fields, including
advertising, user experience design, and content
creation, aesthetic coherence and adaptability have
a
https://orcid.org/0009-0006-3318-1110
b
https://orcid.org/0009-0007-1825-8105
c
https://orcid.org/0009-0009-5162-9451
become critical concerns, further increasing the
demand for systematic colour palette generation.
The proposed method is a new way for the
creation of attractive colour palettes: through a
combination of mathematical models with machine-
learning techniques for discovering dominant colours
from an image and classifying these to aesthetic
categories. The presented framework improves
efficiency, enabling a systematic approach toward
this traditionally intuitive process in creating palettes.
At the heart of the framework is the application of
Principal Component Analysis (PCA) to reduce
dimensionality, retaining the most dominant
chromatic features of the image. These features are
then clustered in a meaningful way using a clustering
algorithm, allowing for the identification of dominant
colours forming the base palette.
Support Vector Machine (SVM) classifiers is
being used to assign these palettes to aesthetic themes
like "minimalist," "neon," or "pastel." Once
classified, more palettes of the same aesthetic can be
268
Ananya, , Aashish, B. B. V., Chudanath, K., K N, G. and S, S.
Aesthetic of Colour: A Machine Learning Approach of Palette Generation and Aesthetic Classification.
DOI: 10.5220/0013590600004664
Paper published under CC license (CC BY-NC-ND 4.0)
In Proceedings of the 3rd International Conference on Futuristic Technology (INCOFT 2025) - Volume 2, pages 268-276
ISBN: 978-989-758-763-4
Proceedings Copyright © 2025 by SCITEPRESS – Science and Technology Publications, Lda.
generated, allowing for applications in automated
design, adaptive user interfaces, and content
generation. This method provides an effective bridge
between the mathematical underpinnings of colour
analysis and their practical applications in design.
Through a combination of benefits from PCA
reduction, clustering for interpretability, and SVM for
precise classification, this framework simplifies
palette creation while allowing customization and
scalability. This structure responds to some of the key
areas in computational design, visual aesthetics, and
machine learning by providing a strong and adaptive
solution for the generation of colour palettes based on
aesthetic objectives.
2 PROBLEM STATEMENT
The traditional process of selecting harmonious
colour palettes has long relied on the subjective
intuition and experience of artists and designers,
which often proved inconsistent and inefficient.
Despite the increasing demands for visually
appealing and emotionally resonant designs in
brandings, user experience, and content creation, only
a few systematic methods help to streamline palette
creation in a more efficient manner. Most of the
existing computational techniques focus on object
classification or scene analysis, making aesthetic
colour analysis an under-explored domain in the area
of colour perception. This gap points toward a
framework that can extract dominant colours from
images in an automated way and categorize them into
aesthetic classes, allowing for scalable, consistent
palette generation. At the same time, approaching this
problem requires bridging the divide between
computational efficiency and creative demands in the
design.
3 LITERATURE REVIEW
The combination of machine learning and
dimensionality reduction techniques has been a focal
point in such diverse fields as image processing,
security systems, and aesthetic analysis. Methods like
PCA and SVM have been constantly used to achieve
efficient feature extraction and classification and,
therefore, are directly relevant to the proposed
research on colour palette generation and aesthetic
classification.
Jiang et al. (2023) investigated the fusion of
multiple features in image classification. The
application of PCA for dimensionality reduction and
SVM for classification showed how these methods
could be applied to complex datasets—very close to
the requirement in this study of extracting and then
classifying dominant colours from images. This really
demonstrates how PCA and SVM can simplify high-
dimensional colour data while preserving major
features that are important for aesthetic evaluation.
Qi and Wang (2014) highlighted the usefulness of
clustering and classification in improving image
categorization. The work on colour clustering directly
pertains to the proposed study, in which clustering
methods are applied to extract dominant colours.
Extending these methods, the proposed research
carries their application into the aesthetic realm, an
area that has been relatively unexplored.
Shieh et al. (2014) explored the application of
PCA and SVM in combination with PSO to real-time
face recognition. Even though the domain is different,
the flexibility of PCA and SVM to accommodate
different tasks shows their robustness and potential
suitability to the task at hand—colour palette
extraction and classification. More importantly, the
optimization techniques utilized in the study hint at
possible directions for optimizing the proposed
framework.
Malik and Waheed (2021) proposed an
unsupervised approach where PCA was used to
reduce dimensionality, and K-means clustering
addressed classification challenges. This
methodology provides a strong foundation for the
clustering-based extraction of dominant colours from
images, as proposed in this research. The parallels
between hyperspectral data classification and colour
data analysis emphasize the transferability of these
techniques.
Machine learning techniques have also been
extended to security domains, evidenced by
Varunram et al. (2021) Although this is focused on
intrusion detection, the exploration of PCA and other
dimensionality reduction methods shows their
effectiveness in extracting meaningful patterns from
high-dimensional data, which is a critical step in the
proposed research.
Deep learning applications can be seen in many
studies such as the one done by Nossam et al. (2024)
which used convolutional neural networks to detect
forgeries. While this study epitomizes the state of the
art in deep learning, its computational requirements
only strengthen the importance of lightweight
alternatives in the form of PCA and SVM, especially
for aesthetic applications that may not require the
complexity of deep learning models.
Singh and Babu (2019) introduced new methods
for analysing hyperspectral images, showing new
Aesthetic of Colour: A Machine Learning Approach of Palette Generation and Aesthetic Classification
269
ways in which classification methodologies can be
developed. These insights go in tandem with the
proposed research, showing that feature extraction
and classification are key to getting accurate results.
Similarly, Kirola et al. (2022) further emphasizes the
importance of analysing visual data for a wide range
of applications, again validating the potential of
image-based approaches for aesthetic classification.
Although substantial progress has been made,
little emphasis has been placed on leveraging PCA
and clustering techniques specifically for extracting
dominant colours from images and classifying these
palettes into aesthetic categories using SVM. Current
research is mainly devoted to object or scene
classification and overlooks the creative and aesthetic
aspects of colour analysis. The proposed research
addresses this void by introducing a novel framework
that employs PCA and clustering to generate colour
palettes and then classifies them with SVM,
expanding these palettes based on aesthetic
categories. It contributes not only to the advancement
of colour analysis methodologies but also to closing
the gap between computational image processing and
the exploration of aesthetics.
4 DATA PREPRATION
4.1 Image Preprocessing
Input Image: The process begins with the
input image, which is typically in RGB
colour space.
Resizing: To optimize computation and
reduce memory requirements, the image
might be resized to a smaller resolution
while maintaining its colour characteristics.
Flattening the Image: The RGB value of
every pixel in the image is converted into a
2D array where each row represents one
pixel and the columns represent the RGB
colour channels, that is, a matrix with the
size N×3 where N is the total number of
pixels.
4.2 Data Collection and Labelling for
Training Dataset
Input Data: Data was collected as a group of
colour swatches assigned with various
aesthetic classes. Classes include "neon, "
"pastel, " "monochrome, " "vintage, "
"modern".
Labelling: Links a colour swatch in a dataset
to an aesthetic class based on a qualitative
description of their appearances. The labels
are the ground truth for Support Vector
Machines (SVM) training.
4.3 Feature Extraction from Colour
Palettes
Dominant Colours: This can be achieved by
Principal Component Analysis (PCA) and
clustering, for example, Apply k-means on
all images or palettes to pull out the
dominant colours. Those are the dominant
colours that will turn out to become the most
important features in the classification.
Representation of Colour Palette: Each
colour palette obtained from a given image
is represented as a set of features. The
common feature set of course will comprise
of RGB or HSV values of the dominant
colours. Given that to extract K dominant
colours from an image, the feature vector for
this palette would be a vector of K×3 values-
assuming each colour is represented in the
RGB space.
As an example, for the case of K=5
dominant colours, it would have a feature
vector like, Feature Vector = [R1, G1,
B1,B1, R2, G2, B3, R3, G3, B3, R4, G4, B4,
R5, G5, B5]
Figure 1: Importance of various features
Additional features: Depending on the
colour harmony, contrast, saturation, and
distribution in the palette, additional features
like hue, mean luminance, etc. that may
enrich the feature set of the classifier can be
added.
INCOFT 2025 - International Conference on Futuristic Technology
270
5 DATA NORMALIZATION
5.1 Standardization for Applying PCA
Before running Principal Component Analysis
(PCA), the colour data needs to be standardized so as
to have zero mean and unit variance. This ensures that
data is centred around zero; thus, the results from
Principal Component Analysis (PCA) will be
effective.
𝑍=
𝑣𝑎𝑙𝑢𝑒 − 𝑚𝑒𝑎𝑛
𝑠𝑡𝑎𝑛𝑑𝑎
𝑟
𝑑
𝐷
𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛
(1
)
5.2 Preprocessing the Data for
Training
Scaling Features: SVMs scale better when
the input features are in a similar range.
Since RGB colours have values ranging
from 0 to 255, the features need to be
normalized or standardized to range within
the same scale. This is usually achieved by
rescaling the value to fall within the range 0
to 1.
For example,
𝑋 𝑠𝑐𝑎𝑙𝑒𝑑 =
𝑋
2
55
(2)
Splitting Data: Split the labelled dataset into
train and test sets, for instance, using 80-20
split to evaluate the SVM model's
performance.
In doing so, the framework will ensure that the input
to the subsequent machine learning steps is optimized
by carefully preparing and normalizing the data,
which will further enhance the accuracy and
robustness of the aesthetic classification and palette
generation.
6 IMPLEMENTING PRINCIPAL
COMPONENT ANALYSIS (PCA)
AND K-MEANS CLUSTERING
6.1 Apply Principal Component
Analysis (PCA)
Transformation: The transformed data
provided applies Principal Component
Analysis (PCA) on standardized colour data.
PCA's main aim is to reduce the
dimensionality of the data without losing the
most important features. Here, PCA will
identify the directions in which the colour
data varies the most and then project it on a
smaller number of components, often 2 or 3
(Jaadi, 2024).
Figure 2: 3D plot of all RGB pixels
Extract Principal Components: The colour
data of the image is represented in a reduced
dimensional space. For example, when 2
principal components are taken into
consideration, the data of the image is now
reduced to 2 features that describe the
dominant colour variations of the image. It
helps to focus on the most relevant colour
features and eliminates the irrelevance of
others.
Aesthetic of Colour: A Machine Learning Approach of Palette Generation and Aesthetic Classification
271
Figure 3: Eigenvectors aligned in the 3D pixel plot
Figure 4: 2D scatter plot along the PCA components
6.2 Create Clusters
K-means Clustering: Once colour data is
reduced to principal components, a
clustering algorithm such as k-means is used
to group similar colours together. The k-
means algorithm works by partitioning the
data into K clusters, representing the most
dominant colours, based on Euclidean
distances between points in the principal
component space.
It initializes the problem using K centroids,
then assigns a closest centroid to each pixel
or data point and recalculates the centroids
based on the mean of all points assigned to
each cluster. The process is repeated until
the centroids converge (Yasini, 2023).
Identify K: The value of K is user-defined,
which means it specifies how many
dominant colours will be found. There are
two ways to decide on K: image complexity
and the degree of colour granularity needed.
In most applications, K is set to a low value,
such as 5 or 10, so as to reflect the major
colour groups within the image.
Figure 5: Clusters formed in PCA space
6.3 Assignment of Dominant Colours
Colour Identification: After the cluster
process, every cluster should be assigned a
dominant colour, which is generally
considered to be the centroid of that cluster.
The centroid represents the average colour
of all the pixels in that cluster, which is
therefore referred to as the "dominant"
colour for that region of the image.
Creation of the Palette: The final output is a
list of K dominant colours. Such colours
often appear in a colour space like RGB or a
more perceptually uniform colour space
such as HSL or LAB.
6.4 Advantage of Applying PCA
Verification that applying Principal Component
Analysis (PCA) is helping can be done using the
following:
K-Means Clustering Inertia Comparison:
It basically Measures compactness of clusters. Lower
is better.
INCOFT 2025 - International Conference on Futuristic Technology
272
Inertia =
p
oints
(a)
2
(3)
a: distance to nearest centroid
Silhouette Score:
Measures separation between clusters. Higher is
better.
𝑆𝑆 =
𝑏−𝑎
𝑀𝑎𝑥(𝑎, 𝑏)
(4)
a: Mean distance to points in the same cluster.
b: Mean distance to points in the nearest different
cluster.
7 IMPLEMENTING SUPPORT
VECTOR MACHINE (SVM)
7.1 Train the Support Vector Machine
(SVM) Model
7.1.1 Kernal Selection
SVMs use various kernels to transform the input
space. The most common in general use are:
Linear Kernel: It is perfect for linearly
separable data.
Radial Basis Function (RBF) Kernel: This
one comes into general use where data is not
linearly separable.
Polynomial Kernel: Applied when data
follows some non-linear patterns.
The linear kernel works well when the classes are
somewhat distinct and separable with a straight line
(or hyperplane in higher dimensions), making it a
simpler and faster choice compared to the more
complex RBF kernel (Patle and Chouhan, 2013).
SVMs can only handle binary classification, so to
deal with multiclass problems One-vs-One (OvO) is
being used.
7.1.2 How OvO binary classification works
Train a separate SVM classifier for each pair
of classes.
For C classes, train C×(C−1)/2 classifiers,
each on a different pair of classes.
In this case, all classifiers classify the
sample into one class, and the class that
receives most of the votes is assigned to the
sample
7.1.3 Training the SVM
Train the SVM model on the training set. In the
training step, the SVM will try to find that optimal
hyperplane which best separates the various aesthetic
classes in the feature space.
Figure 6: Training Data in PCA space
The model learns to classify each colour palette
based on its extracted features and the corresponding
label, namely aesthetic category.
7.2 Model Evaluation
Testing the Model: After training, test the
performance of SVM on testing set to see
how good it is in identifying unseen colour
palettes. It is an interesting business metric,
as below:
Accuracy: Percentage of correct predictions.
Precision, Recall, F1 Score: These metrics
give further insight into how well the model
does in handling each aesthetic category,
specifically where data is imbalanced.
Figure 7: Confusion Matrix
Aesthetic of Colour: A Machine Learning Approach of Palette Generation and Aesthetic Classification
273
Confusion Matrix: A confusion matrix
shows the number of correct and incorrect
classifications for each class-aesthetic
category-helping to visualize the
performance of the model.
Cross-validation: Use cross-validation to
enhance the reliability of the model's
performance estimate by training and testing
on different subsets of the data.
7.3 Aesthetic Prediction
Classification of New Colour Palettes:
Using the learned SVM model, one can then
classify new colour palettes. For example,
given a new collection of dominant colours
that have been extracted from an image, this
model would predict the aesthetic category
that best describes the image in terms of the
learned patterns.
Figure 8: SVM decision boundary in PCA space
Results Visualization: After the model
generates an aesthetically pleasing class
prediction, this gives room to visualize the
colour palette with its aesthetic label. These
suggestions can then be used to generate
dynamic colour palette recommendations
based on the aesthetic one wants, thus
making the process henceforth more
personalized or tailored.
Propose other visual palettes: Given a
classification of some colour style palette, it
then proposes other palettes that share
similar aesthetic properties. That is done by
querying a database for other palettes with
the same predicted aesthetic.
8 RESULTS AND DISCUSSIONS
The proposed system has been tested on images
containing nature, architecture, and artwork for
checking the dominant colour extraction, aesthetic
classification, and palettes generation. The results are
as follows:
Firstly, this image was uploaded.
Figure 9: Uploaded Image
From the uploaded image, colour data is retrieved
from each pixel and it is reduced in dimension by
using Principal Component Analysis (PCA). So
instead of three components (RGB), only two
components are being used.
These pixels are then clustered using K-means
clustering and 5 dominant colour are received from
the uploaded image. These colours are displayed as
copyable hex codes as well as a visual palette.
Figure 10: Colour palette Generated
The advantages of using Principal Component
Analysis (PCA) can be mathematically seen.
Reduction in clustering inertia indicates more
compact clusters being formed after using PCA.
Increased silhouette score indicates more distance
between different clusters after using PCA.
INCOFT 2025 - International Conference on Futuristic Technology
274
Figure 11: Inertia Comparison and Silhouette Score results
Finally, the model is correctly able to predict the
image aesthetic as pastel and provides the user with
similar pastel palettes as well.
Figure 12: Predicted Aesthetic and Similar Palettes
Dominant Colour Extraction: Principal
Component Analysis (PCA) effectively
reduced the dimensionality of colour space
while preserving the most impactful colour
features. Overall, K-Means was the best
overall clustering algorithm that could
segment the dominant colours to a general
average accuracy of 95% in identifying key
visual tones.
Aesthetic Classification: The Support
Vector Machines (SVM) classifier is also
trained on a labelled set of aesthetic
categories such as "minimalistic," "vivid,"
and "monochromatic," achieving a
classification accuracy of 94%. It, therefore,
exemplifies the robustness of the system in
projecting dominant colour palettes into
subjective aesthetic labels.
Results indicate that there is hidden potential in
using the Principal Component Analysis (PCA),
Clustering, and Support Vector Machines (SVM)
together in an aesthetic-driven system for building a
palette since good performance was obtained from the
identification of colours and categorization into
Figure13: Classification report
aesthetic subjective groups. The feasibility of
applying such systems in domains which have
demonstrated distinct need for clear computational
precision and sensitive aesthetic perception was
confirmed.
Therefore, what is required are refined algorithms
for clustering or even additional features such as
texture and spatial information for further
performance.
Another useful output was the generation of novel
palettes for the same aesthetic class. Many design
applications, such as automated design systems for
branding and content creation, would be useful with
this system. Sometimes, the output would not be
especially novel, but aesthetically coherent. Future
versions of the system could use generative models
such as GAN (Generative Adversarial Networks) to
make the system much more creative.
Accordingly, the proposed system bridges the gap
between computational colour analysis and aesthetic
interpretation. In this manner, it is extremely useful
for applications depending upon perception and
engagement by users highly based on colour.
9 CONCLUSIONS
This paper proposes a novel method of colour palette
generation based on the integration of dimensionality
reduction, clustering, and supervised classification. A
system is developed and successfully used to extract
dominant colours from the images using Principal
Component Analysis (PCA) and clustering, classify
palettes into aesthetic categories with Support Vector
Machines (SVM), and generate additional palettes
consistent with the identified aesthetic.
The results show this methodology has the
capability of achieving high accuracy in both colour
extraction and aesthetic classification and presents
itself as a robust tool to use in applications related to
design, branding, and even content creation. In
Aesthetic of Colour: A Machine Learning Approach of Palette Generation and Aesthetic Classification
275
addition, the generated palettes were found to be
aesthetic coherent, thus underlining practical utility.
Despite the positive results, it still has drawbacks,
such as handling complicated textures and enhancing
the originality of generated palettes. Here, there are
many possible future research directions: in addition
to modern algorithms, GANs (Generative Adversarial
Networks) could be used to add generative creativity,
while other features help with more detailed aesthetic
classification.
The proposed system bridges the gap between
computational and subjective domains,
demonstrating the potential of leveraging
mathematical frameworks to address artistic
challenges. This work lays the groundwork for future
innovations in automated design systems and
aesthetic-driven computational tools.
ACKNOWLEDGEMENTS
We sincerely thank Dr. Geetha K N and Dr. Shali S
for their valued guidance throughout the semester and
for helping us with all their time and effort in shaping
this project. We express our gratitude for your
supervision and constructive feedback which brought
us to the completion of the project.
REFERENCES
Jiang, C., Chen, T., Tao, G. (2023). Gap image
classification based on PCA-SVM with multiple feature
fusion. 2023 4th International Conference on
Mechatronics Technology and Intelligent
Manufacturing (ICMTIM). IEEE.
Qi, L. Y., Wang, K. G. (2014). Information system in image
classification based on SVM and color clustering
analysis. Advanced Materials Research, 886, 572–575.
Shieh, M. Y., Chiou, J. S., Hu, Y. C., Wang, K. Y. (2014).
Applications of PCA and SVM‐PSO‐based real‐time
face recognition system. Mathematical Problems in
Engineering, 2014(1), Article 530251.
Malik, A., Waheed, M. (2021). Unsupervised classification
of hyperspectral images using PCA and k-means.
Yasini, S. (2023). Using machine learning to create custom
colour palettes. Towards Data Science. Available at:
https://towardsdatascience.com/using-machine-
learning-to-create-custom-colour-palettes-
acb4eeaa06aa.
Jaadi, Z. (2024). Principal Component Analysis (PCA): A
step-by-step explanation. Brennan Whitfield.
Patle, A., Chouhan, D. S. (2013). SVM kernel functions for
classification. 2013 International Conference on
Advances in Technology and Engineering (ICATE), 1–
9.
Varunram, T. N., Shivaprasad, M. B., Aishwarya, K. H.,
Balraj, A., Savish, S. V., Ullas, S. (2021). Analysis of
different dimensionality reduction techniques and
machine learning algorithms for an intrusion detection
system. 2021 IEEE 6th International Conference on
Computing, Communication and Automation (ICCCA),
237–242.
Nossam, S. C., Katakam, R. A., Pulastya, G., Jayan, S.
(2024). Signature forgery detection and verification
using deep learning techniques. 2024 15th International
Conference on Computing, Communication and
Networking Technologies (ICCCNT), 1–6.
Singh, T., Babu, T. (2019). Fractal image processing and
analysis for classification of hyperspectral images.
2019 10th International Conference on Computing,
Communication and Networking Technologies
(ICCCNT), 1–6.
Kirola, M., Joshi, K., Chaudhary, S., Singh, N., Anandaram,
H., Gupta, A. (2022). Plants diseases prediction
framework: An image-based system using deep
learning. 2022 IEEE World Conference on Applied
Intelligence and Computing (AIC).
INCOFT 2025 - International Conference on Futuristic Technology
276