You should implement a distance algorithm. For example, be your color table:
SELECT 1 as id, 'Orange and Blue' as name,'0c6cab' as color UNION ALL
SELECT 2, 'Black and White','dba27e' UNION ALL
SELECT 3, 'Full Colors ','7ba709' UNION ALL
SELECT 4, 'RoG ','970404' UNION ALL
SELECT 5, 'Triangles ','167694'
(which is what you were showing)
You can separate each hexadecimal number in its own field:
SELECT
colors.*,
LEFT(color,2) as R ,
RIGHT(LEFT(color,4),2) as G,
RIGHT(color,2) as B
FROM colors;
What I would give you:
+----+-----------------+-------------------------------+
| id | name | color | R | G | B |
+----+-----------------+-------------------------------+
| 1 | Orange and Blue | 0c6cab | 0c | 6c | ab |
| 2 | Black and White | dba27e | db | a2 | 7e |
| 3 | Full Colors | 7ba709 | 7b | a7 | 09 |
| 4 | RoG | 970404 | 97 | 04 | 04 |
| 5 | Triangles | 167694 | 16 | 76 | 94 |
+----+-----------------+-------------------------------+
Now, you can express those columns with their transformation to decimal:
SELECT
colors.*,
CONV(LEFT(color,2),16,10) as R ,
CONV(RIGHT(LEFT(color,4),2),16,10) as G,
CONV(RIGHT(color,2),16,10) as B
FROM colors;
+----+-----------------+--------------------------------+
| id | name | color | R | G | B |
+----+-----------------+--------------------------------+
| 1 | Orange and Blue | 0c6cab | 12 | 108 | 171|
| 2 | Black and White | dba27e | 219 | 162 | 126|
| 3 | Full Colors | 7ba709 | 123 | 167 | 9|
| 4 | RoG | 970404 | 151 | 4 | 4|
| 5 | Triangles | 167694 | 22 | 118 | 148|
+----+-----------------+--------------------------------+
The "distance" of a RGB color (200,100,120) to each of your colors would be
distancia = sqrt( (200-R)² + (100-G)² + (120-B)² )
This would be better encapsulated in a function that takes two hexadecimals, separates them in decimal RGB and makes this calculation, returning the distance.
Given the above, you only need to filter the query to those records whose distance from the color entered is less than your tolerance margin.