Skip to content

Commit

Permalink
Merge branch 'v4.6' into 'main'
Browse files Browse the repository at this point in the history
Prepare version 4.6

See merge request Wacton/Unicolour!67
  • Loading branch information
waacton committed Aug 1, 2024
2 parents a95b7b7 + e7e12a7 commit 3e3f2fd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Example.Console/Example.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@
<ProjectReference Include="..\Unicolour\Unicolour.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="SWOP2006_Coated5v2.icc">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
8 changes: 6 additions & 2 deletions Example.Console/Program.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
using Spectre.Console;
using Wacton.Unicolour;
using Wacton.Unicolour.Icc;

var config = new Configuration(iccConfiguration: new("SWOP2006_Coated5v2.icc", Intent.RelativeColorimetric, "SWOP2006"));

var white = new Unicolour("#000000");
var black = new Unicolour("#FFFFFF");

const int col1Width = 8;
const int col2Width = 24;
const int col2Width = 32;
const int barLength = col1Width + 2 + col2Width + 2 + 3; // 2 per column padding, 3 for all borders

while (true)
Expand All @@ -14,7 +17,7 @@
var inputHex = AnsiConsole.Ask<string>("[dim]Colour hex:[/]");
try
{
var unicolour = new Unicolour(inputHex);
var unicolour = new Unicolour(config, inputHex);
var useWhiteText = unicolour.Difference(white, DeltaE.Cie76) > unicolour.Difference(black, DeltaE.Cie76);
AnsiConsole.MarkupLine(GetBar(unicolour, useWhiteText));
AnsiConsole.Write(GetTable(unicolour));
Expand Down Expand Up @@ -87,6 +90,7 @@ static Table GetTable(Unicolour unicolour)
table.AddRow("Cam02", $"{unicolour.Cam02}");
table.AddRow("Cam16", $"{unicolour.Cam16}");
table.AddRow("Hct", $"{unicolour.Hct}");
table.AddRow("Icc", $"{unicolour.Icc}");
return table;
}

Binary file added Example.Console/SWOP2006_Coated5v2.icc
Binary file not shown.
1 change: 1 addition & 0 deletions Example.Console/ThirdPartyNotices/SWOP2006_Coated5v2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright X-Rite, Inc. This profile is made available by IDEAlliance, with permission of X-Rite, Inc., and may be used, embedded, exchanged, and shared without restriction. It may not be altered, or sold without written permission of IDEAlliance.
2 changes: 1 addition & 1 deletion Unicolour.Datasets/Unicolour.Datasets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<RootNamespace>Wacton.Unicolour.Datasets</RootNamespace>
<LangVersion>10</LangVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>2.2.0</Version>
<Version>2.3.0</Version>
<Authors>William Acton</Authors>
<Description>Datasets for use with 🌈 Wacton.Unicolour</Description>
<Copyright>William Acton</Copyright>
Expand Down
Binary file modified Unicolour.Readme/docs/console-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Unicolour/Unicolour.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageIcon>Resources\Unicolour.png</PackageIcon>
<PackageVersion>4.5.0</PackageVersion>
<PackageVersion>4.6.0</PackageVersion>
<PackageTags>colour color RGB HSB HSV HSL HWB HSI XYZ xyY WXY LAB LUV LCH LCHab LCHuv HSLuv HPLuv YPbPr YCbCr YCgCo YUV YIQ YDbDr TSL XYB IPT ICtCp JzAzBz JzCzHz Oklab Oklch Okhsv Okhsl Okhwb CAM02 CAM16 HCT ICC icc-profile CMYK CMYKOGV converter colour-converter colour-conversion color-converter color-conversion colour-space colour-spaces color-space color-spaces interpolation colour-interpolation color-interpolation colour-mixing color-mixing comparison colour-comparison color-comparison contrast luminance deltaE chromaticity display-p3 rec-2020 rec-601 rec-709 A98 ProPhoto ACES ACEScg ACEScct ACEScc xvYCC PAL NTSC SECAM gamut-mapping temperature cct duv cvd colour-vision-deficiency color-vision-deficiency colour-blindness color-blindness protanopia deuteranopia tritanopia achromatopsia spd dominant-wavelength excitation-purity imaginary-color imaginary-colour</PackageTags>
<PackageReleaseNotes>Add ICC profile support (v2, Output device, LAB PCS)</PackageReleaseNotes>
<ApplicationIcon>Resources\Unicolour.ico</ApplicationIcon>
Expand Down
Binary file modified docs/console-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3e3f2fd

Please sign in to comment.