 Cropped and zoomed comparison between the original true color image (left) and the YJK (right) version.

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: $Y$ , $J$ and $K$ . $Y$ is similar to luminance (but computed differently), $J$ and $K$ are the chrominance components (representing the red and green color differences). The $Y$ component is a 5-bit value (0 to 31), specified for each individual pixel.

The $J$ and $K$ components are stored together in 6 bits (-32 to 31) and shared between 4 nearby pixels (4:2:0 chroma sub-sampling).

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 (red, green and blue) source. The weighted values of $R$ , $G$ and $B$ are added together to produce a single $Y$ signal, representing the overall brightness of that pixel. The $J$ signal is then created by subtracting the $Y$ from the red signal of the original RGB, and then scaling; and $K$ by subtracting the $Y$ 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:

$Y=B/2+R/4+G/8$ $J=R-Y$ $K=G-Y$ From YJK to RGB:

$R=Y+J$ $G=Y+K$ $B=(5/4)Y-J/2-K/4$ You may note that the $Y$ 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.

1. ^ MSX Licensing Corporation (2022). "The YJK screen modes". MSX Assembly Page.
2. ^ Niemietz, Ricardo Cancho (2014). Issues on YJK colour model implemented in Yamaha V9958 VDP chip (PDF).
3. ^ "VCFe Vortrag vom 2016.04.30 - Homecomputer und Spielkonsolen - Videoarchitekturen als visuelles Medium". neil.franklin.ch. Retrieved 2022-11-13.
4. ^ IC Master. United Technical Publications. 2001.
5. ^ Martín Sesma, Sergio (2016-10-03). Arqueología informática: los ordenadores MSX en los inicios de la microinformática doméstica (Proyecto/Trabajo fin de carrera/grado thesis). Universitat Politècnica de València.
6. ^ Redazione (2008-10-20). "MSX - Vari Costruttori- 1983". CyberLudus.com (in Italian). Retrieved 2022-11-13.
7. ^ a b "V9958 MSX-VIDEO TECHNICAL DATA BOOK" (PDF). 1988.
8. ^ Alex, Wulms (1995). "Schermen op MSX - De 2+ schermen" (PDF). MSX Computer & Club Magazine (72).
9. ^ S. Winkler, C. J. van den Branden Lambrecht, and M. Kunt (2001). "Vision and Video: Models and Applications". In Christian J. van den Branden Lambrecht (ed.). Vision models and applications to image and video processing. Springer. p. 209. ISBN 978-0-7923-7422-0.`((cite book))`: CS1 maint: multiple names: authors list (link)
10. ^ a b "The YJK screen modes". map.grauw.nl.
11. ^ Silveira, Marcelo (2017). MSX 2+ Colors (PDF).
12. ^ Nunes, Giovanni (8 June 2015). "Edição de imagens num MSX2+/MSX turbo R". retropolis.com.br.
13. ^ Chancho Niemietz, Ricardo (2014). "Issues on YJK colour model implemented in Yamaha V9958 VDP chip" (PDF).