Color component (source code)

= Color component

A \b[color component] is one numerical coordinate used by a <color model> to describe a colour. An <RGB> representation has red, green and blue components, while <YCbCr> has <luma (video)> and two colour-difference components. Their meanings depend on the model and encoding: a component need not represent a separately emitted primary light. The Microsoft technical guide explicitly separates RGB signals from Y, Cb and Cr and gives their conversion equations.<Recommended 8-Bit YUV Formats for Video Rendering by Gary Sullivan and Stephen Estrop>[Introduction; Color Space and Chroma Sampling Rate Conversions]{ref}

For an original normalized <Linear-light RGB> example, the triple $(0.20,0.40,0.80)$ contains three component values for one colour sample. Its blue component is $0.80$; that scalar alone does not specify the complete colour. A second triple $(0.70,0.10,0.80)$ shares that blue component while differing in red and green. Likewise, the same numerical triple interpreted in different <color spaces> need not describe the same physical colour.

A component is also distinct from a storage plane. An eight-bit <packed pixel format> can place three RGB component codes in three successive <bytes> for each <pixel>, all in one <image memory plane>. <NV12M> instead uses a <luma (video)> plane and an interleaved colour-difference plane: two memory planes carry three color components. <Chroma subsampling> can additionally give the components different spatial sample counts.

An <alpha channel> describes transparency or coverage rather than another coordinate of the colour itself. PNG consequently distinguishes truecolour samples with red, green and blue components from truecolour-with-alpha samples that carry an additional alpha value.<Portable Network Graphics (PNG) Specification (Third Edition) by Mark Adler and others>[§4.5, PNG image types; §11.2.1, IHDR colour-type/sample table]{ref} Component identity, sample location, numerical encoding and storage layout together determine how an image is interpreted.