1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
SpoinkyNL 2020-10-21 20:06:51 +02:00
commit d8d54cff01
3 changed files with 29 additions and 4 deletions

View File

@ -1,5 +1,4 @@
using Artemis.Core.Services.Interfaces;
using SkiaSharp;
using SkiaSharp;
using System;
using System.Collections.Generic;
using System.Linq;

View File

@ -1,12 +1,38 @@
namespace Artemis.Core.Services
{
/// <summary>
/// The types of relevant colors in an image.
/// </summary>
public enum ColorType
{
/// <summary>
/// Represents a saturated color.
/// </summary>
Vibrant,
/// <summary>
/// Represents a saturated and light color.
/// </summary>
LightVibrant,
/// <summary>
/// Represents a saturated and dark color.
/// </summary>
DarkVibrant,
/// <summary>
/// Represents a desaturated color.
/// </summary>
Muted,
/// <summary>
/// Represents a desaturated and light color.
/// </summary>
LightMuted,
/// <summary>
/// Represents a desaturated and dark color.
/// </summary>
DarkMuted
}
}

View File

@ -1,7 +1,7 @@
using SkiaSharp;
using System.Collections.Generic;
namespace Artemis.Core.Services.Interfaces
namespace Artemis.Core.Services
{
/// <summary>
/// A service providing a pallette of colors in a bitmap based on vibrant.js
@ -23,7 +23,7 @@ namespace Artemis.Core.Services.Interfaces
/// </summary>
/// <param name="colors">The colors to find the variations in</param>
/// <param name="type">Which type of color to find</param>
/// <param name="ignoreLimits">Ignore hard limits on whether a color is considered for each category. Result may be <see cref="SKColor.Empty"/> if this is true</param>
/// <param name="ignoreLimits">Ignore hard limits on whether a color is considered for each category. Result may be <see cref="SKColor.Empty"/> if this is false</param>
/// <returns>The color found</returns>
public SKColor FindColorVariation(IEnumerable<SKColor> colors, ColorType type, bool ignoreLimits = false);
}