Agent skill

Pixijs Color

by netaart in netaart/cohub

A skill your agent uses when creating, converting, or manipulating colors in PixiJS v8.

MITAuto-check passed

Install Pixijs Color

skills CLI
$ npx skills add netaart/cohub --skill pixijs-color -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install netaart/cohub pixijs-color --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/netaart/cohub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/pixijs-color .claude/skills/pixijs-color && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pixijs-color
GitHub stars
572
Used in
1 other repo
Token cost
~2.2k tokens
SKILL.md length
418 words
Files
1
Skills in repo
30
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when creating, converting, or manipulating colors in PixiJS v8.

  • Manipulating colors in PixiJS v8
  • SKILL.md covers Quick Start, Core Patterns, Common Mistakes and API Reference
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Color conversion

What it does

Pixijs Color is an agent skill from netaart/cohub. Use this skill when creating, converting, or manipulating colors in PixiJS v8. Covers Color class input formats (hex, CSS names, RGB/HSL objects, arrays, Uint8Array), conversion methods (toHex, toNumber, toArray, toRgba), component access, setAlpha/multiply/premultiply, Color.shared singleton. Triggers on: Color, ColorSource, hex, rgb, hsl, tint, premultiply, Color.shared, color conversion.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: A living space where people and agents create, play, and build together. The licence is MIT.

When your agent uses it

  • Manipulating colors in PixiJS v8
  • Color conversion

Example prompts

  • “/pixijs-color”

What it can do on your machine

Read from SKILL.md and the folder at commit eee4291. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • pixijs.download

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pixijs Color loads about 2.2k tokens when it runs. Until then it costs about 102 tokens; SKILL.md has 418 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~102
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from netaart/cohub at commit eee4291, republished under its MIT licence (© netaart). 418 words, ~2,216 tokens.

Download SKILL.mdSave it as .claude/skills/pixijs-color/SKILL.md (or your agent's skills folder).
name
pixijs-color
description
Use this skill when creating, converting, or manipulating colors in PixiJS v8. Covers Color class input formats (hex, CSS names, RGB/HSL objects, arrays, Uint8Array), conversion methods (toHex, toNumber, toArray, toRgba), component access, setAlpha/multiply/premultiply, Color.shared singleton. Triggers on: Color, ColorSource, hex, rgb, hsl, tint, premultiply, Color.shared, color conversion.
license
MIT
disable-model-invocation
true

The Color class creates and converts colors for tints, fills, strokes, and anywhere PixiJS accepts a ColorSource. Most APIs accept raw hex/strings directly, so explicit new Color(...) is only needed when converting formats or manipulating values.

Quick Start

ts
const fillColor = new Color("#ff6600");
console.log(fillColor.toHex()); // '#ff6600'
console.log(fillColor.toNumber()); // 0xff6600
console.log(fillColor.toArray()); // [1, 0.4, 0, 1]

const g = new Graphics().rect(0, 0, 200, 100).fill(fillColor);
app.stage.addChild(g);

const sprite = Sprite.from("hero.png");
sprite.tint = "dodgerblue";
app.stage.addChild(sprite);

const t = Color.shared.setValue(0xffffff).multiply([1, 0.5, 0.5]).toNumber();
sprite.tint = t;

Related skills: pixijs-scene-graphics (fill/stroke colors), pixijs-scene-sprite (tint), pixijs-blend-modes (compositing).

Core Patterns

Accepted input formats
ts
import { Color } from "pixi.js";

// Hex integer
new Color(0xff0000);

// Hex strings
new Color("#ff0000");
new Color("#f00");
new Color("ff0000");

// CSS color names
new Color("red");
new Color("dodgerblue");

// RGB/RGBA objects (components 0-255)
new Color({ r: 255, g: 0, b: 0 });
new Color({ r: 255, g: 0, b: 0, a: 0.5 });

// HSL/HSLA objects
new Color({ h: 0, s: 100, l: 50 });
new Color({ h: 0, s: 100, l: 50, a: 0.5 });

// HSV/HSVA objects
new Color({ h: 0, s: 100, v: 100 });

// CSS strings
new Color("rgb(255, 0, 0)");
new Color("rgba(255, 0, 0, 0.5)");
new Color("hsl(0, 100%, 50%)");

// Normalized 0-1 arrays (Float32Array or plain arrays)
new Color([1, 0, 0]); // RGB
new Color([1, 0, 0, 0.5]); // RGBA

// Uint8 arrays (components 0-255)
new Color(new Uint8Array([255, 0, 0]));
new Color(new Uint8ClampedArray([255, 0, 0, 128]));

// 8-digit hex with alpha
new Color("#ff0000ff");
new Color("#f00f");

// Copy from another Color instance
const red = new Color("red");
const copy = new Color(red);
Conversion methods
ts
import { Color } from "pixi.js";

const color = new Color("#ff6600");

color.toHex(); // '#ff6600'
color.toHexa(); // '#ff6600ff' (hex with alpha)
color.toNumber(); // 0xff6600
color.toArray(); // [1, 0.4, 0, 1] (normalized RGBA)
color.toRgbArray(); // [1, 0.4, 0] (normalized RGB, no alpha)
color.toRgbaString(); // 'rgba(255,102,0,1)'
color.toRgba(); // { r: 1, g: 0.4, b: 0, a: 1 }
color.toRgb(); // { r: 1, g: 0.4, b: 0 }
color.toUint8RgbArray(); // [255, 102, 0]

// setValue() is the chainable way to change a color's value
color.setValue(0xff0000).toHex(); // '#ff0000'
Component access
ts
import { Color } from "pixi.js";

const color = new Color("rgba(255, 128, 0, 0.8)");

color.red; // 1
color.green; // ~0.502
color.blue; // 0
color.alpha; // 0.8

All component getters return normalized 0-1 values.

Manipulation
ts
import { Color } from "pixi.js";

const color = new Color("red");

// Set alpha (chainable)
color.setAlpha(0.5);

// Multiply with another color (destructive, modifies in place)
color.multiply(0x808080);

// Premultiply alpha (destructive, RGB channels multiplied by alpha)
color.premultiply(0.8);

// Premultiply alpha only (RGB unchanged)
color.premultiply(0.8, false);

// Chain operations
new Color("white").setAlpha(0.5).multiply([0.8, 0.2, 0.2]);

multiply() and premultiply() are destructive; they modify the color and set value to null (original format is lost).

Non-destructive premultiplied output
ts
import { Color } from "pixi.js";

const color = new Color("red").setAlpha(0.5);

const packed = color.toPremultiplied(color.alpha); // 0x7F7F0000
const alphaOnly = color.toPremultiplied(color.alpha, false); // 0x7FFF0000

toPremultiplied(alpha, applyToRGB?) returns a 32-bit 0xAARRGGBB integer without mutating this. Use it in batchers and tint math where the source color must be reused. When applyToRGB is false, only the alpha byte is packed; the RGB stays at its full value.

Reusing output buffers
ts
import { Color } from "pixi.js";

const rgba = new Float32Array(4);
const rgb = new Float32Array(3);
const rgb8 = new Uint8Array(3);

app.ticker.add(() => {
  Color.shared.setValue(sprite.tint).toArray(rgba).toRgbArray(rgb);

  Color.shared.toUint8RgbArray(rgb8);
});

toArray(out?), toRgbArray(out?), and toUint8RgbArray(out?) accept a reusable number[], Float32Array, Uint8Array, or Uint8ClampedArray and write into it. Pass your own buffer in hot paths to avoid allocating per frame; omit the argument and the Color instance returns its internal cache array.

Packing for GPU buffers
MethodReturns
toBgrNumber()24-bit 0xBBGGRR integer with R/B swapped
toLittleEndianNumber()Same 24-bit swap, convenient for little-endian vertex writes

Both are cheap and useful when emitting colors straight into packed vertex attributes.

Color.shared for temporary operations
ts
import { Color } from "pixi.js";

// One-off conversion without allocating a new Color
const hex = Color.shared.setValue("#ff6600").toNumber();
const arr = Color.shared.setValue(0xff0000).toArray();

Color.shared is a singleton that avoids allocating a new Color on every call. This matters in hot paths like render loops or per-frame tint calculations where repeated new Color() creates GC pressure. Do not store references to it; other code may mutate it.

ts
import { Color } from "pixi.js";

// Good: reuse shared instance in a per-frame callback
app.ticker.add(() => {
  const t = performance.now() / 1000;
  sprite.tint = Color.shared
    .setValue("white")
    .multiply([Math.sin(t) * 0.5 + 0.5, 0.2, 0.8])
    .toNumber();
});
Show full SKILL.md (167 more words)Show less
Validating input
ts
import { Color } from "pixi.js";

Color.isColorLike("red"); // true
Color.isColorLike("#ff0000"); // true
Color.isColorLike(0xff0000); // true
Color.isColorLike([1, 0, 0]); // true
Color.isColorLike({ r: 1, g: 0, b: 0 }); // true
Color.isColorLike({ foo: 1 }); // false
Color.isColorLike(null); // false

Color.isColorLike() checks the structural shape (string, number, array, or recognized object). It doesn't validate that a string is a real CSS color name, nor that array values fall in range. Use it as a type guard before passing user input to new Color() or setValue().

Common Mistakes

[MEDIUM] Expecting toRgba() to return 0-255 values

Wrong:

ts
import { Color } from "pixi.js";

const { r, g, b } = new Color({ r: 255, g: 128, b: 0 }).toRgba();
// r = 1, g = ~0.502, b = 0 (NOT 255, 128, 0)

Correct:

ts
import { Color } from "pixi.js";

// Use toUint8RgbArray() for 0-255 output
const [r, g, b] = new Color({ r: 255, g: 128, b: 0 }).toUint8RgbArray();
// r = 255, g = 128, b = 0

RGB object inputs use 0-255 range ({ r: 255, g: 0, b: 0 }), but all output methods (toRgba(), toRgb(), toArray(), toRgbArray()) normalize to 0-1. Use toUint8RgbArray() when you need 0-255 integers for CSS or external APIs.

[MEDIUM] Using 0-255 range in color arrays

Wrong:

ts
import { Color } from "pixi.js";

new Color([255, 0, 0]); // NOT red; values are interpreted as 0-1

Correct:

ts
import { Color } from "pixi.js";

new Color([1, 0, 0]); // red via normalized array
new Color(0xff0000); // red via hex
new Color("red"); // red via CSS name
new Color(new Uint8Array([255, 0, 0])); // red via Uint8Array (0-255)

Plain number arrays (number[] and Float32Array) use normalized 0-1 range. [255, 0, 0] clamps to [1, 0, 0] because values are clamped, but [200, 100, 50] does not produce the expected color. Use Uint8Array or Uint8ClampedArray for 0-255 input.

[MEDIUM] Using utils.string2hex or utils.hex2string

Wrong:

ts
import { utils } from "pixi.js";

const hex = utils.string2hex("#ff0000");

Correct:

ts
import { Color } from "pixi.js";

const hex = new Color("#ff0000").toNumber();
const str = new Color(0xff0000).toHex();

The utils namespace was removed in v8. Use the Color class for all color conversions.

API Reference

© netaart, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/pixijs-color of netaart/cohub.

Open the folder on GitHubat commit eee4291

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in netaart/cohub, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pixijs Color next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pixijs Color compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pixijs Color this skillnetaart/cohub5721 repos~2.2kAutomated safety check: PassMIT
Convertremotion-dev/remotion63k—~247Automated safety check: PassCustom licence
Color Expertnexu-io/open-design100k—~331Automated safety check: PassApache-2.0
Color Blockingsickn33/agentic-awesome-skills47k1 repos~2.4kAutomated safety check: PassMIT
Mono ColorNousResearch/hermes-agent252k—~2.9kAutomated safety check: PassMIT
Word to Markdown Convertergithub/awesome-copilot40k—~1.6kAutomated safety check: PassMIT

Similar skills

  • Convert

    remotion-dev/remotion

    Official

    Start the local @remotion/convert app and open it in the Codex browser.

    63k GitHub stars~247 tokensUpdated yesterday
    Media & CreativeAuto-check passed
  • Color Expert

    nexu-io/open-design

    Color science expert skill with 286K words of reference material covering OKLCH/OKLAB, palette generation, accessibility/contrast, color naming, pigment mixing, and historical color theory.

    100k GitHub stars~331 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Color Blocking

    sickn33/agentic-awesome-skills

    Web and App implementation guide for Color Blocking. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 1 repo~2.4k tokens
    MobileAuto-check passed
  • Mono Color

    NousResearch/hermes-agent

    Generate one- or two-ink editorial print poster images. An agent skill from NousResearch/hermes-agent.

    252k GitHub stars~2.9k tokensUpdated yesterday
    Frontend & DesignAuto-check passed
  • Word to Markdown Converter

    github/awesome-copilot

    Official

    Converts Word .docx files to Markdown with a bundled script before analysis, extracting embedded images and handling whole folders alongside the PDF and Excel converters.

    40k GitHub stars~1.6k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed
  • Better Colors

    trycompai/crm

    OKLCH color space and color usage for web projects. An agent skill from trycompai/crm.

    11k GitHub stars~1.9k tokensUpdated 29 days ago
    Frontend & DesignAuto-check passed

More from netaart/cohub

All 30 skills in this repo
  • Pixijs Assets

    netaart/cohub

    A skill your agent uses when loading and managing resources in PixiJS v8.

    572 GitHub starsUsed in 1 repo~5k tokens
    Auto-check passed
  • A skill your agent uses when reasoning about the PixiJS v8 scene graph as a whole: how containers, leaves, transforms, and render order fit together.

    572 GitHub starsUsed in 1 repo~3.9k tokens
    Auto-check passed
  • Pixijs Scene Mesh

    netaart/cohub

    A skill your agent uses when rendering custom geometry in PixiJS v8.

    572 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Pixijs Scene Sprite

    netaart/cohub

    A skill your agent uses when drawing images in PixiJS v8. An agent skill from netaart/cohub.

    572 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Pixijs Scene Text

    netaart/cohub

    A skill your agent uses when rendering text in PixiJS v8. An agent skill from netaart/cohub.

    572 GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • A skill your agent uses when understanding how PixiJS v8 renders frames: the systems-and-pipes renderer, the render loop, and how the library adapts to different environments.

    572 GitHub stars~1.7k tokensUpdated today
    Auto-check passed

Questions about Pixijs Color

What does Pixijs Color do?

A skill your agent uses when creating, converting, or manipulating colors in PixiJS v8. Pixijs Color is an agent skill from netaart/cohub. Use this skill when creating, converting, or manipulating colors in PixiJS v8.

When should I use Pixijs Color?

Pixijs Color fits situations like: manipulating colors in PixiJS v8; color conversion.

How do I install Pixijs Color in Claude Code?

Run `npx skills add netaart/cohub --skill pixijs-color -a claude-code`. Or copy the skill folder (.agents/skills/pixijs-color in netaart/cohub) into .claude/skills/pixijs-color in your project. Claude Code loads it when a task matches its description.

How do I install Pixijs Color in Codex?

Run `npx skills add netaart/cohub --skill pixijs-color -a codex`. Or copy the skill folder (.agents/skills/pixijs-color in netaart/cohub) into .agents/skills/pixijs-color in your project. Codex loads it when a task matches its description.

Can I use Pixijs Color in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add netaart/cohub --skill pixijs-color -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pixijs-color, .gemini/skills/pixijs-color, .github/skills/pixijs-color and .opencode/skills/pixijs-color in your project.

What does Pixijs Color need to run?

SKILL.md names no scripts, command-line tools or credentials: Pixijs Color is instructions for the agent only.

Does Pixijs Color access the network?

SKILL.md names 1 domain. As links in the text: pixijs.download. This is read from the text; nothing was executed.

Is Pixijs Color safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Pixijs Color use?

Pixijs Color is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pixijs Color use?

About 2.2k tokens (SKILL.md is roughly 8.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Pixijs Color?

Skills that share tags, products or a category with Pixijs Color: Convert (remotion-dev/remotion, 63k stars), Color Expert (nexu-io/open-design, 100k stars), Color Blocking (sickn33/agentic-awesome-skills, 47k stars) and Mono Color (NousResearch/hermes-agent, 252k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pixijs Color?

netaart (a GitHub organization) maintains it in netaart/cohub, which has 572 GitHub stars. The repository holds 30 skills in this directory. The repository was last updated on October 10, 2026.

Source: netaart/cohub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.