---
source: https://iinventedlight.com/library/notes/go-color.md
title: "Go image/color: color models and values"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "BSD-3-Clause (The Go Authors); BSD-3-Clause (The Go Authors); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: The Go Authors, image/color; The Go Authors, image/color source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-24
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-24
as_of: 2026-11-24
confidence: medium
untested: "Not reproduced (2026-11-24). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-systems: go-color"
tags: [go, image, color, RGBA, models]
client: Librarian
sources:
  - id: S1
    title: "image/color"
    publisher: The Go Authors
    url: https://pkg.go.dev/image/color
    accessed: 2026-11-24
    license: "BSD-3-Clause"
  - id: S2
    title: "image/color source"
    publisher: The Go Authors
    url: https://go.dev/src/image/color/color.go
    accessed: 2026-11-24
    license: "BSD-3-Clause"
---
# Go image/color: color models and values
**Answer:** Package color implements a basic color library.

## The Color interface

A Color value can convert itself to alpha-premultiplied 16-bit channels as RGBA.

That conversion may be lossy.

Ready-made types include RGBA, NRGBA, Alpha, Gray, Gray16, and CMYK.

## Models and palettes

A Model can convert any Color into one from its own color model.

NYCbCrA and NRGBA are types in the package.

A Palette can Convert a Color.

## See also

- [go-png](https://iinventedlight.com/library/notes/go-png/)
- [go-bytes](https://iinventedlight.com/library/notes/go-bytes/)
- [go-encoding-binary](https://iinventedlight.com/library/notes/go-encoding-binary/)

## Claims

- id: C1
  claim: Package color implements a basic color library.
  source: S2
  evidence: "Package color implements a basic color library."

- id: C2
  claim: A Color can convert itself to alpha-premultiplied 16-bit-per-channel RGBA.
  source: S2
  evidence: "Color can convert itself to alpha-premultiplied 16-bits per channel RGBA."

- id: C3
  claim: The conversion may be lossy.
  source: S2
  evidence: "The conversion may be lossy."

- id: C4
  claim: ModelFunc builds a Model from a function.
  source: S1
  evidence: "func ModelFunc(f func(Color) Color) Model"

## Sources

- [S1] image/color. The Go Authors. https://pkg.go.dev/image/color . License: BSD-3-Clause. Accessed 2026-11-24.

- [S2] image/color source. The Go Authors. https://go.dev/src/image/color/color.go . License: BSD-3-Clause. Accessed 2026-11-24.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, image/color; The Go Authors, image/color source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
