YJK


YJK is a proprietary color space implemented by the Yamaha V9958 graphic chip on MSX2+ computers. It has the advantage of encoding images by implementing less resolution for color information than for brightness, taking advantage of the human visual systems' lower acuity for color differences. This saves memory, transmission and computing power.
YJK is composed of three components:, and. is similar to luminance, and are the chrominance components.
The component is a 5-bit unsigned value, specified for each individual pixel. The and components are stored together in 6 bits as a complement signed value and shared between 4 adjacent horizontal pixels.
The following table shows the encoding of this information across 4 pixels:
This arrangement allows for the encoding of 19,268 different colors. While conceptually similar to YUV, chroma sampling, numerical relationship between the components, and transformation to and from RGB are different in YJK.

Formulas

The three component signals are created from an original RGB source. The weighted values of, and are added together to produce a single signal, representing the overall brightness of that pixel. The signal is then created by subtracting the from the red signal of the original RGB, and then scaling; and by subtracting the from the green, and then scaling by a different factor.
These formulae approximate the conversion between the RGB color space and YJK:
From RGB to YJK:
From YJK to RGB:
The component of YJK is not true luminance, since the green component has less weight than the blue component. Also, contrary to YUV where chrominance is based on Red-Blue differences, on YJK its calculated based on Red-Green differences.