Palett 0.4.16
See the version list below for details.
dotnet add package Palett --version 0.4.16
NuGet\Install-Package Palett -Version 0.4.16
<PackageReference Include="Palett" Version="0.4.16" />
<PackageVersion Include="Palett" Version="0.4.16" />
<PackageReference Include="Palett" />
paket add Palett --version 0.4.16
#r "nuget: Palett, 0.4.16"
#:package Palett@0.4.16
#addin nuget:?package=Palett&version=0.4.16
#tool nuget:?package=Palett&version=0.4.16
Color space tools
Features
- Transform between RGB and HSL color spaces.
- Convert among hex, int, (byte r, byte g, byte b), (float h, float s, float l) and System.Drawing.Color.
- Applicable to styles: Bold, Italic, Underline, and Inverse.
- Render an array or 2d-array of number into colored based on the relative value of each number.
Content
Package | Content |
---|---|
Palett |
The core library, including all Palett sub projects |
Palett.Cards |
Preset color cards with 14 degrees of color gradients |
Palett.Convert |
Convert colors among hex / int / rgb / hsl / Color |
Palett.Deco |
Render terminal string color |
Palett.Dye |
Colorant (factory) for terminal string |
Palett.Fluos |
Colorize array and 2d-array in terminal |
Palett.Presets |
Preset color range |
Palett.Projector |
Project a number to colored based on a range |
Palett.Types |
Base types in Palett series |
Palett.Utils |
Base static params of ANSI values |
Install
Palett targets .NET Standard 2.0, suitable for .NET and .NET Framework.
Install Palett package and its dependencies.
NuGet Package Manager:
Install-Package Palett
.NET CLI:
dotnet add package Palett
All versions can be found on nuget.
Usage
Convert color
using Palett.Convert;
// using RGB = System.ValueTuple<byte, byte, byte>;
// using HSL = System.ValueTuple<float, float, float>;
(byte, byte, byte) rgb = (242, 114, 69);
var hsl = rgb.RgbToHsl();
var hex = hsl.HslToHex();
var rgb2 = Conv.HexToRgb(hex);
var int = rgb2.RgbToInt();
Colorize vector
using Palett;
using Palett.Fluos;
var samples = new[] { "foo", "bar", "zen", "16", "24", "32", "64" };
var colored = samples.Fluo(Presets.Planet);
Examples
Palett has a test suite in the test project.
Feedback
Palett is licensed under the MIT license.
Bug report and contribution are welcome at the GitHub repository.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Palett.Cards (>= 0.4.16)
- Palett.Convert (>= 0.4.16)
- Palett.Dye (>= 0.4.16)
- Palett.Fluos (>= 0.4.16)
- Palett.Munsell (>= 0.4.16)
- Palett.Presets (>= 0.4.16)
- Palett.Projector (>= 0.4.16)
- Palett.Utils (>= 0.4.16)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Palett:
Package | Downloads |
---|---|
Spare.Deco
Format enumerables: array, 2d-array, dictionary, etc. into string for console output |
|
NeXL.Core.Ranges
Extension for Excel.Range |
|
NeXL.Core.Hyper
Macros for Excel |
|
NePT.Core.Shapes
Extension for PowerPoint.Shapes |
|
NePT.Core.Hyper
Hypers for PowerPoint |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
0.4.20 | 166 | 11/29/2024 |
0.4.19 | 182 | 11/27/2024 |
0.4.18 | 346 | 11/25/2024 |
0.4.17 | 213 | 11/24/2024 |
0.4.16 | 227 | 11/24/2024 |
0.4.15 | 115 | 11/24/2024 |
0.4.14 | 112 | 11/22/2024 |
0.4.13 | 294 | 11/4/2024 |
0.4.12 | 334 | 11/2/2024 |
0.4.11 | 120 | 11/1/2024 |
0.4.10 | 111 | 11/1/2024 |
0.4.9 | 117 | 10/31/2024 |
0.4.8 | 469 | 10/26/2021 |
0.4.7 | 388 | 10/25/2021 |
0.4.6 | 1,130 | 10/25/2021 |
0.4.5 | 483 | 10/24/2021 |
0.4.4 | 502 | 10/23/2021 |
0.4.3 | 419 | 10/11/2021 |
0.4.2 | 1,337 | 10/9/2021 |
0.4.1 | 1,542 | 10/5/2021 |
0.4.0 | 1,319 | 9/27/2021 |
0.3.4 | 774 | 9/27/2021 |
0.3.3 | 456 | 9/27/2021 |
0.3.2 | 1,290 | 9/26/2021 |
0.3.1 | 403 | 9/26/2021 |
0.3.0 | 417 | 9/25/2021 |
0.2.18 | 404 | 9/25/2021 |
0.2.17 | 513 | 9/25/2021 |
0.2.16 | 434 | 9/5/2021 |
0.2.15 | 427 | 9/5/2021 |
0.2.14 | 1,742 | 9/3/2021 |
0.2.12 | 999 | 9/3/2021 |
0.2.11 | 1,720 | 9/2/2021 |
0.2.10 | 747 | 9/2/2021 |
0.2.9 | 777 | 9/2/2021 |
0.2.8 | 424 | 9/2/2021 |
0.2.7 | 417 | 8/31/2021 |
0.2.6 | 1,666 | 8/31/2021 |
0.2.5 | 400 | 8/31/2021 |
0.2.4 | 394 | 8/30/2021 |
0.2.3 | 902 | 8/30/2021 |
0.2.2 | 2,229 | 8/20/2021 |
0.2.1 | 982 | 8/17/2021 |
0.2.0 | 409 | 8/17/2021 |
0.1.21 | 1,299 | 8/16/2021 |
0.1.20 | 404 | 8/16/2021 |
0.1.19 | 2,110 | 8/16/2021 |
0.1.18 | 795 | 8/14/2021 |
0.1.17 | 482 | 8/14/2021 |
0.1.16 | 418 | 8/13/2021 |
0.1.15 | 418 | 8/13/2021 |
0.1.14 | 1,162 | 8/13/2021 |
0.1.13 | 720 | 8/12/2021 |
0.1.12 | 786 | 8/12/2021 |
0.1.11 | 493 | 8/3/2021 |
0.1.10 | 772 | 7/28/2021 |
0.1.8 | 447 | 7/28/2021 |
0.1.7 | 435 | 7/28/2021 |
0.1.6 | 411 | 3/7/2021 |
0.1.5 | 490 | 3/6/2021 |
0.1.4 | 447 | 3/3/2021 |
0.1.3 | 6,923 | 2/7/2021 |
0.1.2 | 421 | 1/31/2021 |
0.1.1 | 446 | 1/31/2021 |
0.1.0 | 720 | 1/30/2021 |
0.0.16 | 427 | 1/30/2021 |
0.0.15 | 789 | 1/30/2021 |
0.0.14 | 414 | 1/30/2021 |
0.0.12 | 428 | 1/30/2021 |
0.0.11 | 434 | 1/30/2021 |
0.0.10 | 1,012 | 1/29/2021 |
0.0.9 | 429 | 1/29/2021 |