pixijs-color

Convert and manipulate colors for PixiJS v8 across multiple input formats.

1|Updated Apr 26, 2026
One-click install
npx skills add https://github.com/matthewharwood/dean-stack --skill pixijs-color-matthewharwood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pixijs-color
Source: https://github.com/matthewharwood/dean-stack/tree/main/.claude/skills/pixijs-color
Command: npx skills add https://github.com/matthewharwood/dean-stack --skill pixijs-color-matthewharwood

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing colors across PixiJS can be verbose and error-prone due to many input formats and conversion paths. This guide clarifies how to create, convert, and manipulate colors in PixiJS v8 using a consistent API for fills, tints, and UI elements.

Core Features & Use Cases

  • Accepts hex, CSS color names, RGB/RGBA objects, HSL/HSLA, and Uint8Array inputs, converting them to consistent internal representations.
  • Provides conversion methods such as toHex, toNumber, toArray, toRgba, and supports the Color.shared singleton for hot-path operations.
  • Use cases include applying tints to sprites, composing layer colors for graphics, and performing premultiply operations for proper alpha handling.

Quick Start

Initialize a Color with a hex or named color and apply it to a Graphics fill.

Frequently Asked Questions about pixijs-color

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert hex and RGB colors for PixiJS v8 sprites?

To convert hex and RGB colors for PixiJS v8 sprites, initialize a Color object with your desired input format and use conversion methods like toHex, toNumber, or toRgba to apply consistent fills and tints to your visuals.

What color input formats does PixiJS v8 support for graphics fills?

PixiJS v8 supports multiple color input formats for graphics fills, including hex strings, CSS color names, RGB/RGBA objects, HSL/HSLA values, and Uint8Array inputs, converting them into consistent internal representations.

How do I apply tints to sprites using PixiJS color conversion utilities?

To apply tints to sprites using PixiJS color conversion utilities, create a Color instance from a supported input format and pass the converted color value to the sprite's tint property for accurate visual transformations.

Can I use HSL values when creating colors for PixiJS UI elements?

Yes, you can use HSL or HSLA values when creating colors for PixiJS UI elements. The color handling API accepts HSL input and provides conversion methods to translate it into the required internal color representations.

What is the best way to handle frequent color transformations in PixiJS without creating objects?

The best way to handle frequent color transformations in PixiJS without creating objects is to use the Color.shared singleton, which provides an optimized conversion utility for hot-path operations and reduces memory overhead.

Why do I need premultiply operations when handling alpha in PixiJS graphics?

You need premultiply operations when handling alpha in PixiJS graphics to ensure proper alpha blending and prevent visual artifacts. The color API supports premultiply operations to correctly calculate the final rendered pixel colors.