Le 12 avr. 07 à 10:15 Matin, Lars Jensen a écrit: >> I've started a project where I need to sort a list of colors, by >> color...So far, sorting using HSV values seems to be best, >> but there are odd gaps and jumps... > > Function RGBColorDistance(Color1 as Color, Color2 as Color) as > Double > return (Color1.Red - Color2.Red) ^ 2 _ > + (Color1.Green - Color2.Green) ^ 2 _ > + (Color1.Blue - Color2.Blue) ^ 2 > End Function
Is it not possible to simply use this formula: Color1.Red+Color1.Green*256+Color1.Blue*256? _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
