ColorLib 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ColorLib --version 1.0.0
                    
NuGet\Install-Package ColorLib -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ColorLib" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ColorLib" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ColorLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ColorLib --version 1.0.0
                    
#r "nuget: ColorLib, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ColorLib@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ColorLib&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ColorLib&version=1.0.0
                    
Install as a Cake Tool

ColorLib

A library that allows you to use HEX and RGB colors in mods. Also has built-in colors.

Dependancy

Current State

  • Not published in Nuget

Using the Library

Build from source

  • Clone this repository with git clone https://github.com/Quest-play/ColorLib.git
  • Navigate into the directory (if using the zip you have to unzip it first)
  • Build with the command dotnet build (requires .NET SDK 6)
  • The built dll is in the folder bin/Debug/net6.0/ColorLib.dll

Examples of use

using Gatekeeper.Items;
using GKAPI.Items;
using GKAPI.Lang;

using static ColorLib.ColorLib; // ColorLib - colors

namespace ColorLib.Example
{
    public static class ItemRegister
    {
        private static object itemAPI;

        public static void RegisterItems(ItemAPI itemAPI)
        {

            var testItem = itemAPI.AddItem(new GkItem.Builder("Test Item", "Test item description", $"{ColorHelper.WrapInColor("Some Text", DarkGreen)} {ColorHelper.WrapInColor("Some Text", Blue)} {ColorHelper.WrapInColor("Some Text", Purple) }.") // {ColorHelper.WrapInColor("Any Text", COLOR FROM COLORLIB)}
            .SetUnlocked(true)
            .SetHidden(false)
            .AsModifier()
            );
        }
    }
}

Result

result

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.1.0 280 8/30/2025
3.0.0 254 8/30/2025
2.1.0 249 8/30/2025
2.0.0 197 8/29/2025
1.0.0 345 8/29/2025 1.0.0 is deprecated because it has critical bugs.

First version of the library: several built-in colors, support for HEX and RGB colors.