Jurnal Ilmiah Universitas Satya Negara Indonesia
Vol. 4 No. 2 (2026): Mei - October 2026

IMPLEMENTATION OF K-NEAREST NEIGHBOR FOR COLOR CLASSIFICATION: IMPLEMENTASI K-NEAREST NEIGHBOR UNTUK KLASIFIKASI WARNA

Riama Sibarani (Universitas Satya Negara Indonesia)
Muhamad Saefudin (STMIK Jakarta STI&K)
Sukarno Bahat Nauli (Universitas Satya Negara Indonesia)



Article Info

Publish Date
14 Aug 2026

Abstract

The human eye's ability to identify colors has subjective limitations and is influenced by fatigue and ambient lighting conditions. This study aims to design and test a computer vision-based automatic color detection system using the Python programming language and the OpenCV library. The research method used was a laboratory experiment with a quantitative approach. The system was developed using the Euclidean distance algorithm to calculate the proximity input Red, Green, and Blue (RGB) pixel values to a reference database containing 865 standard color names. Testing was carried out using a dataset under various lighting conditions.The test results showed high effectiveness, with an average Macro Average Precision of 97.12%, Recall of 97.11%, and Total System Accuracy of 97.11%. The conclusion of this study is that the Python-based color detection system with the using the Euclidean distance algorithm is valid and effective for standardizing color identification, with the note that optimization or normalization of lighting in dim environments is necessary.

Copyrights © 2026






Journal Info

Abbrev

jisni

Publisher

Subject

Economics, Econometrics & Finance Engineering Languange, Linguistic, Communication & Media Law, Crime, Criminology & Criminal Justice Social Sciences

Description

Jurnal Ilmiah Satya Negara Indonesia (JISNI) is a multidisciplinary journal dedicated to advancing scientific knowledge through research that explores developments across various faculties and study programs at Satya Negara Indonesia University. JISNI seeks to provide an esteemed platform for ...