Question about Spectrum colours

Share graphical tips, notes and queries related to our favourite screen layout and its editors.
Post Reply
User avatar
zxbruno
Manic Miner
Posts: 214
Joined: Sun Mar 04, 2018 6:13 am

Question about Spectrum colours

Post by zxbruno »

I was very young when I discovered that Spectrum colours were perfect for creating a fade effect (from 0 to 7 or from 7 to 0) in my BASIC programs, especially when using a black and white TV or monitor. However, I still don't understand the logic behind it. Can anyone please explain it in layman's terms? If you ask someone if Green is darker than Cyan, they'd look at you funny.... :mrgreen: But to a Spectrum user, Green is darker than Cyan.

Is it because they're sorted by the order they appear in the colour spectrum, no pun intended?

Another question: Is this the reason we have wonderful art that uses different colours when depicting faces of people or animals? Those pictures probably look excellent if displayed on a monochrome display.

This thought occurred to me because I'm starting to see the same effect being used in real world products, such as this:

https://www.amazon.co.uk/Jigsaw-Colourf ... B087J8JFST
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: Question about Spectrum colours

Post by Ast A. Moore »

zxbruno wrote: Thu Apr 29, 2021 4:07 am I was very young when I discovered that Spectrum colours were perfect for creating a fade effect (from 0 to 7 or from 7 to 0) in my BASIC programs, especially when using a black and white TV or monitor. However, I still don't understand the logic behind it. Can anyone please explain it in layman's terms? If you ask someone if Green is darker than Cyan, they'd look at you funny.... :mrgreen: But to a Spectrum user, Green is darker than Cyan.
It’s not perfect, and there are color changing sequences that do a better job approximating the fade effect. However, going from 0 to 7 and back looks good enough in most cases (and is easier to code).

Green is darker than cyan, because it only uses the green phosphor on a CRT (or the green sub-pixel on an LCD), whereas cyan uses both green and blue.

Besides, the perceived brightness of each additive color component is different. On a TV screen, pure white is created by mixing the primary colors approximately in the following proportion:

Red: 30%
Green: 59%
Blue: 11%

When individual colors, or combinations of only two colors, are displayed, their total intensities will vary depending on the displayed color.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
1024MAK
Bugaboo
Posts: 3130
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Question about Spectrum colours

Post by 1024MAK »

The analogue video is actually made up of two separate signals. The intensity (brightness and contrast) or luminance and then the colour signals.

On a monochrome display, the colour information is not used, as the TV / monitor only has the circuitry to process the luminance signal.

The human eye has different receptors to detect light, one type does intensity and a different type detects the colours. This is why you can’t distinguish colours in dark/very low light conditions.

The upshot of all this is, without the distraction of seeing colour, the different ‘colours’ on screen have different luminance levels. And it’s not an accident that they are in order of black through to white. This was deliberate.

See also the TV colour bar test card
Image
Notice the order of the colours...

If you look at the waveform of the video signal when a colour bar test card is being displayed, without the colour information, the signal level looks like a staircase going down (left = top, to bottom = right).

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
4thRock
Manic Miner
Posts: 415
Joined: Thu Nov 09, 2017 9:35 am
Location: Portugal

Re: Question about Spectrum colours

Post by 4thRock »

As mentioned by the previous user, each color has two signals:
» luminance
» saturation & hue

The system generates both values using a clever RGB bit arrangement.
If you order the RGB bits according to the percentages mentioned on the previous posts (Green contributes more, Blue less) you get GRB.

Using this order, let's count in binary:

GRB
000 = 0
001 = 1
010 = 2
011 = 3
100 = 4
101 = 5
110 = 6
111 = 7

So we get 8 luminance levels, and 8 RGB combinations (hues) making up our colour palette ​;)
Saturation is always 100% (there's no bit to control it)

(I've ignored the bright attribute, but it's just an extra bit that controls a small luminance variation)
User avatar
Lethargeek
Manic Miner
Posts: 747
Joined: Wed Dec 11, 2019 6:47 am

Re: Question about Spectrum colours

Post by Lethargeek »

Ast A. Moore wrote: Thu Apr 29, 2021 4:58 am Besides, the perceived brightness of each additive color component is different. On a TV screen, pure white is created by mixing the primary colors approximately in the following proportion:

Red: 30%
Green: 59%
Blue: 11%
this is very old formula for older version of NTSC (that is now not quite right even for modern NTSC)
PAL (and other colorspaces) %% are different, look for these in capital Y columns here
AndyC
Dynamite Dan
Posts: 1420
Joined: Mon Nov 13, 2017 5:12 am

Re: Question about Spectrum colours

Post by AndyC »

Lethargeek wrote: Thu Apr 29, 2021 12:16 pm
Ast A. Moore wrote: Thu Apr 29, 2021 4:58 am Besides, the perceived brightness of each additive color component is different. On a TV screen, pure white is created by mixing the primary colors approximately in the following proportion:

Red: 30%
Green: 59%
Blue: 11%
this is very old formula for older version of NTSC (that is now not quite right even for modern NTSC)
PAL (and other colorspaces) %% are different, look for these in capital Y columns here
Probably more crucial is actually the fact that our eyes can perceive changes in green light most and changes in blue light the least.
User avatar
zxbruno
Manic Miner
Posts: 214
Joined: Sun Mar 04, 2018 6:13 am

Re: Question about Spectrum colours

Post by zxbruno »

Ast A. Moore wrote: Thu Apr 29, 2021 4:58 amOn a TV screen, pure white is created by mixing the primary colors approximately in the following proportion:

Red: 30%
Green: 59%
Blue: 11%
Thank you. As a kid I was taught that black was the absence of colour and white was the combination of all colours, but never thought of looking up RGB or CMYK values for pure white.
Post Reply