Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find a "sufficiently different" RGB?

Tags:

colors

rgb

Provided you are given a color in a form of RGB, is there a way to programmatically determine whether it is sufficiencly different from some other RGB.

Say, i'd like to test whether colors are at least 30% apart from one another, how do i do it? Or, put differently, how can i generate a color that is sufficiently different from another color?

like image 840
James Raitsev Avatar asked Jan 18 '23 20:01

James Raitsev


1 Answers

this is a minefield, because human optical processing is horribly messy. but what you're asking about is colour difference - that page gives various different formulae that can be used to calculate different values that represent the "difference" between two colours.

[update] and here's an online calculator that will apparently calculate those differences for you (it's complicated and links don't change urls, so it's hard to link to, but if you click around it might make sense....)

like image 134
andrew cooke Avatar answered Apr 07 '23 11:04

andrew cooke