I'm going to take the chance that you aren't fucking with me and ask how the hell you "program color"? HSV and RGB are two of several ways to describe a color.
Somehow pedantic and still less precise than the person you're "correcting". These are colour models used for digitally representing and manipulating colours. In fact, HSV was specifically developed for computer graphics.
It's a bit like if someone posted a meme about HTML and you insisted it had nothing to do with programming, it's just for "describing a document".
And since you asked how you "program a colour", you could probably do it using HSV or RGB.
What do you think it means to program? Most people think it means to give a computer a set of instructions to perform a task. Like displaying a colour on a digital display for example.
You are being deliberately obtuse since you claim RGB and HSV have "zero to do with programming" and everyone knows that's a ridiculous statement. Especially since HSV was literally created for programming computer graphics.
Except usualy the subject of the verb "program" is often not the thing you give instructions to, but the instructions you are giving the computer. People rarely say "I programmed a computer last year", they say things like "I programmed a CFD solver" or "I programmed a fitness app".
You are being deliberately obtuse and pedantic by insisting that you can't "program a colour".
Even your non-programming example of an image editor is programming related. But you're moving the goalposts. Most people on this subreddit probably don't think all posts have to be about things that are specific ONLY to programming and have no relevance in any other area, because nothing satisfies that criteria. So long as it is relevant to programming, you claimed it has "zero to do with" it.
It’s all fun and games until you’re programming a lighting unit and have to balance additive mixing(RGB leds) vs CMY moving lights(there are CMY color filters in them). Irl vs concept suckssss
Yeah transitions/overlaps between all possible 2 colors are impossible in HSV. For example you can't make a gradient between green and red, cause the hue slider will go through yellow and orange. In RGB you can just incrementally inc/dec each channel and you won't end up with unwanted colors in the middle.
In RGB you can just incrementally inc/dec each channel and you won't end up with unwanted colors in the middle.
Maybe I'm missing something, but if you do that incremental change from FF0000 to 00FF00, wouldn't you still end up with yellow in the middle, when both channels are at half strength?
You do, but the fact that 2 or more channels are approaching the same value (and are also approaching 0), makes the color look so dark/washed out to the point that it doesn't exactly look like yellow to us anymore, it'll look like a shade of green.
808000 is officially called "Olive Green". The transition is from red to browns to green, with greenish browns at the midpoint. But that's probably one of the colors with the largest perceptual differences between people, even ignoring people that are colorblind.
You could probably even find people matching different paint swatches to the color displayed on a monitor
It's a difference in intensity. If you imagine the color wheel, and red is a point all the way at the perimiter, adjusting the hue rotates the point on that color wheel about the center, maintaining its maximal distance such that it remains on the perimiter, passing through yellow. Interpolating RGB however does not preserve the apparent intensity of the color-- instead you're plotting a straight line between red and green, which will of course shortcut the perimiter of the color wheel in getting there, so you end up with darker intermediate values, I.e. more brown instead of yellow.
I once had to implement a color diagram for fiber splicing. TIA-598. Which Munsel wire and cable colors. Which is a coloring scheme for PVC (plastic). It's color space can best be described as a cilinder. But it became quickly clear to me that there is no 1-1 mapping with rgb and some colors couldn't even be converted to rgb or the other way around.
Luckily, for my use-case, within the acceptable boundaries for each defined fiber color there was an rgb equivalent.
(That's the joke. He's poking at hsv Simplex virus (Herpes Simplex Virus Simplex virus) being redundant, with another somewhat common redundant misuse. Just like personal PIN number and automated ATM machine in the other guy' comment.)
LCH is really good if you work within the color gradeing mindset. It’s way more simple than LAB (although it has its place) and it’s based on actual colour perception research… I quite like this useful demonstration tool that demonstrates the different axis of the 3D colour space…
I've done a fair bit of lighting design work, and people just love hue rotations, but they always default to doing it in HSV. You migrate it over to LCH and it's so much smoother and nicer.
Not quite, rods stop working properly when light is anything above very dim, L is mostly the red and green cones. a and b are opponent processes (cone(s) minus cone(s)), physiologically further in the visual system than rods and cones. Lab system itself is among the closer to the visual response, but there are better ones that represent actual physiology.
RGB is a direct correlation to most display devices and also how eyes work maybe needs a brightness to mimic the rods. Just needs more values per colour really. Why complicate matters.
And for as long as my users are forced to use my product anyway because it's an in-house solution that management decreed into existence I will keep ignoring it.
Because when we see color, we don't perceive it as "This is intense red and green with almost no blue" which RGB represents, we perceive it as "this is bright saturated yellow", which HSV represents.
Well adjusting hue, value and saturation are what feels more intuitive and is easier to actually work with so it does make sense though? I can't be the only one who thinks "This scene needs to be brighter so I turn the brightness knob" is more intuitive than "I need to probably increase mostly blue but also some red to have a brighter scene but keep the color, hmm no now it looks too blue and doesnt fit with the rest of the scene anymore."
Ultimately, this is why it would make sense to use RGB and/or CMYK to determine the base colour, and then convert to HSV to make adjustments. We get the precision of mixing shades, and marry it to the intuitiveness of just adjusting the brightness knob.
Edit: That, and extend RGB/CMYK to allow negative values, to help model cyans.
our visual system isn't rgb based. the cones in our eyes are sensitive to red, green, and blue respectively but those gets processed as achromatic, blue-yellow, red-green.
The retinal ganglion cells take the stimulus from our cones and builds an achromatic, yellow-blue, red-green opponency system. LUV just so happens to use this same principle.
and cie 1931 XYZ does not directly model human perception. it just so happened to somewhat align with what the cones in our eyes do which wasn't known at the time. there is a reason why cie 2006 shifted to using LMS instead of XYZ. Though even then cie 2006 LMS itself doesn't model human vision because the cones are just the first step in our "visual pipeline". It does give you building blocks to roughly model human vision yourself by making so basic assumptions however.
With a caveat: colour profiles. RGB is not strictly direct if whatever device or application you render to, has a colour profile active that isn't an inert 1-to-1 passthrough.
op probably didn't mean that intentionally but I like this interpretation. if you are going to use a perceptually uniform colorspace for anything demanding you should really be using oklab, ictcp, jzazabz, etc.
I was making a stupid joke about the slide valves being trash :P I prefer the old separate valves that take more than one turn to open/close fully.
I think oklab or okhsl are probably the best practical choices for colour spaces, but nothing too wrong with using RGB or HSL depending on application.
265
u/Multifruit256 5d ago
If this doesn't fit the sub pls let me know
1.3k
u/Great-Use-3149 5d ago
where's the third valve in the right?
1.3k
u/girlzlut 5d ago •
holy shit this is the first time in probably genuinely years i've seen a new, actually creative meme on this sub 😭
177
u/KingOfWhateverr 5d ago
It’s all fun and games until you’re programming a lighting unit and have to balance additive mixing(RGB leds) vs CMY moving lights(there are CMY color filters in them). Irl vs concept suckssss
132
u/ktka 5d ago
Sooo HSV is Herpes Simplex Virus, right?
54
u/Rialagma 5d ago
I only know this because HSV is one of the only two cyclical colormaps in matplotlib
16
u/iStumblerLabs 5d ago
No LAB?
10
u/Aksds 5d ago
Hsv
8
u/Boom_Fish_Blocky 1d ago
Meanwhile, people who: Manually inputting hEX codes without a color picker
28
u/boiledbarnacle 5d ago
Actually you get more precision with two valves
7
u/1_89 5d ago
I'm RGBA gang myself. Optical physics day job btw. Vis range 400-700nm light work.
18
u/Pentium95 5d ago
So.. Is CMYK only the water without pipe?
8
u/SweetNerevarine 5d ago
Whilst RGBA is like: you can't see me.
4
u/rosuav 4d ago
Saturation is increased when you open the valve. This makes sense.
13
u/twpejay 5d ago
RGB is a direct correlation to most display devices and also how eyes work maybe needs a brightness to mimic the rods. Just needs more values per colour really. Why complicate matters.
6
u/Fit_Relation8572 5d ago
All taps should be HSV. That's my ted talk.
3
u/damaca_ 4d ago
HS vs RG
5
u/Honest_Relation4095 4d ago
Both taps only have 2 adjustable parameters, not 3.
4
u/Cynixxx 5d ago
HSV
2
u/miguescout 5d ago
I'm now wondering what could represent YUV, though B.S. Johnson's shower comes to mind
2
u/Old_Ad5084 5d ago
oklch is the best
2
u/s0litar1us 3d ago
RGB is how color is displayed.
HSV/HSL is useful when you want to pick colors.
CMYK is for when you need to print something.
1
u/zzmej1987 4d ago
I am laughing at it and being pissed off by how accurate that is simultaneously. XD
1
u/Mireldorn 3d ago edited 3d ago
Polar vs 2D orthogonal coordinatos equals sphere coordinates vs 3d orthogonal vectors?
I guess it equals the 2D Projection, so it's fine as an explanation.
Edit: cylindrical, not sphere.. So I guess it's even better
-4
u/MekaTriK 4d ago
Ah, so you're saying that HSV is objectively trash (just like those stupid valves).
-36
u/Hallwart 5d ago
HSV? The football club?
I think you mean either HSL or HWB