[skip ci] Fix color scape test (#3762)

Co-authored-by: goremykin <goremukin@gmail.com>
Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
This commit is contained in:
Stepan Goremykin 2025-06-01 18:27:58 +02:00 committed by GitHub
parent 3933d5cab2
commit 13dd2d7158
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 9 deletions

View file

@ -10,11 +10,9 @@ using API.Entities.Interfaces;
using API.Extensions;
using Microsoft.Extensions.Logging;
using NetVips;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using SixLabors.ImageSharp.Processing.Processors.Quantization;
using Color = System.Drawing.Color;
using Image = NetVips.Image;
namespace API.Services;
@ -750,7 +748,7 @@ public class ImageService : IImageService
}
public static Color HexToRgb(string? hex)
public static (int R, int G, int B) HexToRgb(string? hex)
{
if (string.IsNullOrEmpty(hex)) throw new ArgumentException("Hex cannot be null");
@ -774,7 +772,7 @@ public class ImageService : IImageService
var g = Convert.ToInt32(hex.Substring(2, 2), 16);
var b = Convert.ToInt32(hex.Substring(4, 2), 16);
return Color.FromArgb(r, g, b);
return (r, g, b);
}