-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Nord dataset See merge request Wacton/Unicolour!66
- Loading branch information
Showing
7 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
namespace Wacton.Unicolour.Datasets; | ||
|
||
// https://www.nordtheme.com/ | ||
public static class Nord | ||
{ | ||
private static readonly Configuration Config = new(RgbConfiguration.StandardRgb, XyzConfiguration.D65); | ||
|
||
public static readonly Unicolour Nord0 = new(Config, "#2e3440"); | ||
public static readonly Unicolour Nord1 = new(Config, "#3b4252"); | ||
public static readonly Unicolour Nord2 = new(Config, "#434c5e"); | ||
public static readonly Unicolour Nord3 = new(Config, "#4c566a"); | ||
public static readonly Unicolour Nord4 = new(Config, "#d8dee9"); | ||
public static readonly Unicolour Nord5 = new(Config, "#e5e9f0"); | ||
public static readonly Unicolour Nord6 = new(Config, "#eceff4"); | ||
public static readonly Unicolour Nord7 = new(Config, "#8fbcbb"); | ||
public static readonly Unicolour Nord8 = new(Config, "#88c0d0"); | ||
public static readonly Unicolour Nord9 = new(Config, "#81a1c1"); | ||
public static readonly Unicolour Nord10 = new(Config, "#5e81ac"); | ||
public static readonly Unicolour Nord11 = new(Config, "#bf616a"); | ||
public static readonly Unicolour Nord12 = new(Config, "#d08770"); | ||
public static readonly Unicolour Nord13 = new(Config, "#ebcb8b"); | ||
public static readonly Unicolour Nord14 = new(Config, "#a3be8c"); | ||
public static readonly Unicolour Nord15 = new(Config, "#b48ead"); | ||
|
||
public static readonly List<Unicolour> PolarNight = new() { Nord0, Nord1, Nord2, Nord3 }; | ||
public static readonly List<Unicolour> SnowStorm = new() { Nord4, Nord5, Nord6 }; | ||
public static readonly List<Unicolour> Frost = new() { Nord7, Nord8, Nord9, Nord10 }; | ||
public static readonly List<Unicolour> Aurora = new() { Nord11, Nord12, Nord13, Nord14, Nord15 }; | ||
|
||
public static IEnumerable<Unicolour> All => new List<Unicolour>() | ||
.Concat(PolarNight) | ||
.Concat(SnowStorm) | ||
.Concat(Frost) | ||
.Concat(Aurora); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System.Linq; | ||
using NUnit.Framework; | ||
using Wacton.Unicolour.Datasets; | ||
|
||
namespace Wacton.Unicolour.Tests; | ||
|
||
public class DatasetNordTests | ||
{ | ||
private static readonly Unicolour[] nord = Nord.All.ToArray(); | ||
|
||
[TestCase(0, "#2e3440")] | ||
[TestCase(1, "#3b4252")] | ||
[TestCase(2, "#434c5e")] | ||
[TestCase(3, "#4c566a")] | ||
[TestCase(4, "#d8dee9")] | ||
[TestCase(5, "#e5e9f0")] | ||
[TestCase(6, "#eceff4")] | ||
[TestCase(7, "#8fbcbb")] | ||
[TestCase(8, "#88c0d0")] | ||
[TestCase(9, "#81a1c1")] | ||
[TestCase(10, "#5e81ac")] | ||
[TestCase(11, "#bf616a")] | ||
[TestCase(12, "#d08770")] | ||
[TestCase(13, "#ebcb8b")] | ||
[TestCase(14, "#a3be8c")] | ||
[TestCase(15, "#b48ead")] | ||
public void ByIndex(int index, string expected) | ||
{ | ||
var colour = nord[index]; | ||
Assert.That(colour.Hex.ToLower(), Is.EqualTo(expected.ToLower())); | ||
} | ||
|
||
[Test] | ||
public void All() | ||
{ | ||
Assert.That(Nord.All.Count(), Is.EqualTo(16)); | ||
Assert.That(Nord.All.Distinct().Count(), Is.EqualTo(16)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters