Hoppa till huvudinnehåll

Introduction

Welcome to Negarity Color — a modern, extensible color manipulation library for PHP.

What is Negarity Color?

Negarity Color is a comprehensive PHP library for working with colors. It provides:

  • Multiple Color Spaces: Support for RGB, RGBA, CMYK, HSL, HSLA, HSV, Lab, LCh, XYZ, and YCbCr
  • Pluggable Registry System: All color spaces, filters, and named colors use a flexible registry system
  • Easy Conversions: Convert between any supported color spaces seamlessly (automatic via RGB hub)
  • Named Colors: Use predefined color names from various color registries
  • Filters: Apply various color filters and transformations (work with any color space via RGB fallback)
  • Extractors: Extract color palettes, histograms, and metadata
  • Extensible: Easily extend the library with custom color spaces, names, filters, and extractors
  • Float Precision: All channel values use floats for maximum precision throughout conversions

Documentation Structure

This documentation is organized into the following sections:

Basics

Learn the fundamentals of working with colors:

Named Colors

Work with predefined color names:

Mutability

Understand the difference between immutable and mutable colors:

Extractors & Analysis

Extract information from colors:

Filters

Apply color transformations:

References

Complete reference documentation:

Extending the Library

Learn how to extend Negarity Color:

Quick Start

Ready to get started? Head over to the Getting Started guide for a quick introduction with examples.