Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/NesTiler.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-09-28 13:54:30 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2022-09-28 13:54:30 +0300
commitd8a7347e0138124b75aceb7e6b65136becffe42f (patch)
tree3ff53bfe369d2a59e9432511a6615d603959942f /NesTiler/ColorExtensions.cs
parentb7fc0da7291ca14e68955944d56cf37cec53d63d (diff)
Created solution
Diffstat (limited to 'NesTiler/ColorExtensions.cs')
-rw-r--r--NesTiler/ColorExtensions.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/NesTiler/ColorExtensions.cs b/NesTiler/ColorExtensions.cs
new file mode 100644
index 0000000..ad6d682
--- /dev/null
+++ b/NesTiler/ColorExtensions.cs
@@ -0,0 +1,22 @@
+using ColorMine.ColorSpaces;
+using ColorMine.ColorSpaces.Comparisons;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.clusterrr.Famicom.NesTiler
+{
+ static class ColorExtensions
+ {
+ public static double GetDelta(this Color color1, Color color2)
+ {
+ var a = new Rgb { R = color1.R, G = color1.G, B = color1.B };
+ var b = new Rgb { R = color2.R, G = color2.G, B = color2.B };
+ var delta = a.Compare(b, new CieDe2000Comparison());
+ return delta;
+ }
+ }
+}