Pacerier
Pacerier

Reputation: 89793

Is HSL converted to RGB before monitors can "process" it?

Hi all I was wondering is it true that the first-language of monitors is the RGB, and internally everything is in RGB?

So does it mean that when we specify color values for "components", HSL is always converted to RGB before it is fed to the monitor,

Or is it the other way round?

I'm aware that different programming languages would have totally different implementations so for a language RGB may be the better choice but for another language HSL might be a better choice etc, but this is more of a general question, like, before the "command" is sent to the monitor, are values in a "rgb representation" or a "hsl representation" ?

PS: wondering if this is better suited for SuperUser, though it's actually a progrmaming question.

Upvotes: 0

Views: 246

Answers (3)

R.. GitHub STOP HELPING ICE
R.. GitHub STOP HELPING ICE

Reputation: 215637

HSL is an utterly irrational color format. The "L" component of HSL has nothing to do with actual gray intensity, and in fact if you rotate the "H" component of an image in HSL space, you'll find that it often inverts the relative intensity of regions of the image and completely ruins gradients where both the color and intensity vary.

If you're looking for a more "natural" colorspace than RGB, YUV (aka YCbCr) might be more to your liking. YUV colorspaces are essentially a linear (or affine depending on the origin point you use) transformation of RGB where the first "Y" axis is along the RGB diagonal (the span of (1,1,1), i.e. grayscale) and the "Cb" and "Cr" axes are perpendicular vectors in the blue and red directions. (The green direction is then a negative linear combination of the Cb and Cr axes.) Hue rotation is then possible by rotating the second and third (Cb,Cr) components of a color vector around the first (Y) axis, and saturation adjustment is just scaling the second and third components.

Relating this back to monitors, while displays actually consist of RGB pixels, old NTSC and PAL TV signals were actually decomposed in YCbCr-based formats and converted back and forth with RGB with analog circuits. This allowed the Y channel to be used unmodified for grayscale ("black and white") displays.

Upvotes: 1

Jerry Coffin
Jerry Coffin

Reputation: 490788

VGA uses analog RGB signaling exclusively.

DVI uses either digital or analog RGB signals. Early in its history, analog was fairly common (it was an easy way for VGA designs to begin supporting DVI). You're not likely to see it anymore except on pretty old equipment though.

HDMI and DisplayPort support both RGB and YCbCr signaling (digital only). I believe most computer display cards use RGB. YCbCr is much more likely to be used by things like DVD and BD players (it saves them some work since the data on the disk is encoded in YCbCr).

Upvotes: 1

Eric Fortis
Eric Fortis

Reputation: 17370

I took a picture of the subpixel array of an old LCD of mine, displaying a full white screen, where you can see the (R)ed,(G)reen,(B)lue. HSL is for making the life easier to humans, so it complicates the computer a bit.

enter image description here

Upvotes: 2

Related Questions