chores: Bump Dependencies, Remove ImageSharp

This commit is contained in:
Raspberry-Monster
2025-10-23 22:38:31 +08:00
parent 7ab833a53a
commit 835e0d34fc
18 changed files with 1311 additions and 277 deletions

View File

@@ -0,0 +1,23 @@
using System;
namespace ColorThiefDotNet
{
public class QuantizedColor
{
public QuantizedColor(Color color, int population)
{
Color = color;
Population = population;
IsDark = CalculateYiqLuma(color) < 128;
}
public Color Color { get; private set; }
public int Population { get; private set; }
public bool IsDark { get; private set; }
public int CalculateYiqLuma(Color color)
{
return Convert.ToInt32(Math.Round((299 * color.R + 587 * color.G + 114 * color.B) / 1000f));
}
}
}