You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 26, 2022. It is now read-only.
public static int FindNextColor(Color c, Color[] palette, decimal threshold = 0)
in Ekona.Images.Actions.cs
If a color represented as vector with coordinates R G B
Distance between two vector equals to |x - y|
Then the threshold value is a radius of a toleranced sphere.
But in the FindNextColor method distance calculated as | |x| - |y| |...
Error or I'm not understanding of a color spectre stucture...
The text was updated successfully, but these errors were encountered:
double x = palette[i].R - c.R;
double y = palette[i].G - c.G;
double z = palette[i].B - c.B;
decimal distance = (decimal)Math.Sqrt(x * x + y * y + z * z);
public static int FindNextColor(Color c, Color[] palette, decimal threshold = 0)
in Ekona.Images.Actions.cs
If a color represented as vector with coordinates R G B
Distance between two vector equals to |x - y|
Then the threshold value is a radius of a toleranced sphere.
But in the FindNextColor method distance calculated as | |x| - |y| |...
Error or I'm not understanding of a color spectre stucture...
The text was updated successfully, but these errors were encountered: