Live data from Hacker News

Practical Color Theory for People Who Code

tallys.github.io

61–70 of 72 posts

Re: Practical Color Theory for People Who Code

#61
post #59

Earlier quoted context omitted.

Apple have made good progress on this. All of their devices (iPhones, iPads and Macs, with the last iMac having a 10-bits-per-channel screen) are now capable of accurately displaying DCI-P3, and their software supports it very well [1][2]. Other companies are also expanding outside sRGB, with Samsung's new phones, the Surface Studio from Microsoft, and Razer's Blade [Pro] also supporting wide color gamuts, although t…

This makes the problem worse. There's 20 years of legacy sRGB images that will not display correctly on wide gamut displays without display compensation in software. iOS and Android are basically repeating all the mistakes made in color management on the desktop, by allowing opt outs by apps and not taking a holistic color management approach. And where the content is created, on the desktop, again if you're using an…

Taking a step makes it worse than doing nothing? How would you go about it?

iOS defaults to rendering sRGB (and Apple's devices do it pretty accurately [1][2]) so nothing changes for legacy images, unless your content or code specifically asks for P3.

Xcode and the App Store also handles thinning/slicing so that wide color content is only delivered to and stored on devices that can display it. [3]

Pretty much all of the leading content creation apps support the matching and embedding of color profiles.

----

> Changing image encoding from sRGB is change for the sake of change - the vast majority of real world image content fits in sRGB.

That's a terrible argument. Holding technology back for the sake of, what?

There were times when the vast majority of "real world" content and applications fit perfectly fine in 640 Kilobytes, 640×480, 256 colors, 2 audio channels and so on.

1920×1080 is still "good enough" and covers the vast majority of content so why bother with 4K?

Many people are happy with consoles yet why do PC owners resent it when a game's graphics are dumbed down?

In any case, wide color can make a considerable difference [4][5][6][7] (to be viewed on capable devices of course, but you can still see comparisons) and the cameras on the new iPads, iPhones and other devices take photos in wide color and do embed that information in the images.

[1] http://www.displaymate.com/iPad_Pro9_ShootOut_1.htm

[2] http://www.displaymate.com/iPhone7_ShootOut_1.htm

[3] https://developer.apple.com/videos/play/wwdc2016/712/

[4] https://webkit.org/blog-files/color-gamut/comparison.html

[5] http://austinmann.com/trek/iphone-7-camera-review-rwanda

[6] http://www.astramael.com

[7] http://furbo.org/color/WideGamut/

Re: Practical Color Theory for People Who Code

#62
post #19

Earlier quoted context omitted.

RGB and HSL are related, but I wouldn't say HSL is based on RGB. From a design point-of-view RGB actually has some problems, as it is difficult to manipulate in a reliable manner. However, from a data point-of-view if is useful because it can scale up or down depending on how much room you have to store information. Also, it relates to the way TV and many video standards transmit information. In HSL, you have saturat…

> RGB and HSL are related, but I wouldn't say HSL is based on RGB. HSL is explicitly defined as a transformation from RGB space, so each RGB triangle has a corresponding HSL space. RGB is absolute garbage for doing anything other than displaying pixels. It's so bad, that the (piecewise) linear transformation to HSL is perceived by many to be good, when it's still equally terrible. The main problem is that not all wav…

Note that “luma” (Y’, to avoid confusion please don’t call this Y) is based on a gamma-adjusted RGB space, and is therefore is not accurate for saturated colors.

To get a reasonably accurate correlate of lightness perception, you need to take your linear combination in a linear RGB space to get luminance (Y), and then afterward apply a non-linear correction to find lightness.

Re: Practical Color Theory for People Who Code

#63

Earlier quoted context omitted.

My basic claim is that contrast in perceived lightness (a.k.a. value, in Munsell’s terminology) is the most salient color attribute in graphic design. This is based on the architecture of human vision. When light comes into the retina, it is measured by three different types of detectors called cone cells (“long” L, “medium” M, and “short” S). But the independent signals from these cone cells are not directly passed…

HCL keeps the perceptual uniformity and I think is friendlier than L\ a\ b\*. Almost any color scheme you choose which has enough lightness contrast will tend to look okay, especially if you avoid picking colors which are outrageously colorful. Solarized[1] is a color scheme that did that and I think it's great. [1] http://ethanschoonover.com/solarized

LCh is just the cylindrical coordinates of CIELAB. It’s the same model.

(Ideally I would include asterisks and subscript ab in the symbols LCh to distinguish this from e.g. the cylindrical coordinates for CIELUV, but this forum doesn’t support it.)

Re: Practical Color Theory for People Who Code

#64
post #44

What I found really useful about this was how the presentation laid it out in a way where I could really understand it. For the first time, I got a simple set of concepts behind choosing colors. Without going back to the article, just what I remembered: 1) Choose complements. 2) Mix them with each other until they dull down a bit 3) Make some other neutral color ( possibly by mixing them in equal parts ? ) and then y…

> (OK -- just considering is there any connection between color theory and the basis of a vector field?)

You’re looking for https://en.wikipedia.org/wiki/Grassmann%27s_law_(optics)

The same Grassmann was (arguably) the creator of linear algebra, several decades before anyone in the mainstream mathematics community took it seriously.

> I understand how to experts, it seems like the wrong advice. But I felt I understood it, and that's invaluable.

Same goes for the flat earth theory or young-earth creationism. :-)

Re: Practical Color Theory for People Who Code

#65

If you want to do something meaningful with colors, don't use RGB, and don't use HSL (which is based on RGB). These spaces are problematic. For instance, pure blue and pure green in RGB space have very different lightness. Here's a picture of the region of colors covered by RGB: https://en.wikipedia.org/wiki/HSL_and_HSV#/media/File:Srgb-i... If RGB space corresponded to what our eyes saw, that would be a perfect hexa…

I built a CIELAB / HCL color-scheme designer prototype, because I wasn't able to find anything comparable. RGB-Based color pickers often make it easy to choose ugly colors. Even though it's unfinished, I think it's already useful. It also visualizes the CIEDE2000 perceived color-distance as a graph in realtime: https://fdietze.github.io/pigment

Re: Practical Color Theory for People Who Code

#66

If you want to do something meaningful with colors, don't use RGB, and don't use HSL (which is based on RGB). These spaces are problematic. For instance, pure blue and pure green in RGB space have very different lightness. Here's a picture of the region of colors covered by RGB: https://en.wikipedia.org/wiki/HSL_and_HSV#/media/File:Srgb-i... If RGB space corresponded to what our eyes saw, that would be a perfect hexa…

Plugging my side project a Munsell to sRGB converter. https://github.com/germ/munsellScript/blob/master/README.md It's useful because it gives a manipulatable version of the colour (lighten the value, shift the hue, etc) and then wing it back to hex. Integrates with keybinds and clipboard integration. Highlight, keybind, manipulate, keybind. Repeat as needed. There's a demo in the readme.

Amazing! I've been looking for a munsell colour space converter for weeks for my branding work. Thanks for posting this.

Re: Practical Color Theory for People Who Code

#67

Earlier quoted context omitted.

Plugging my side project a Munsell to sRGB converter. https://github.com/germ/munsellScript/blob/master/README.md It's useful because it gives a manipulatable version of the colour (lighten the value, shift the hue, etc) and then wing it back to hex. Integrates with keybinds and clipboard integration. Highlight, keybind, manipulate, keybind. Repeat as needed. There's a demo in the readme.

Amazing! I've been looking for a munsell colour space converter for weeks for my branding work. Thanks for posting this.

No worries, give her some use :)

Re: Practical Color Theory for People Who Code

#68
post #29
post #26

Earlier quoted context omitted.

> First off, never, ever use complementary colors as the foundation for your design. A red green color scheme (for example) will produce a result that "vibrates." That's an interesting effect, but I don't see it in the final website layout produced by the tutorial, because neutral colours are introduced between the two complementary colours. So, I don't see how this example supports your assertion against using compl…

To clarify: As a foundation… not a starting point. You're more than welcome to begin with complementary colors, but they should not be the foundation of your final system. Properly segmenting complementary colors of a similar lightness works to reduce this effect, but you are now imposing artificial constraints on your design system: you have to intentionally isolate your colors from one another in order to prevent t…

>You're more than welcome to begin with complementary colors, but they should not be the foundation of your final system.

...that's what this demo does

Re: Practical Color Theory for People Who Code

#69
post #44

What I found really useful about this was how the presentation laid it out in a way where I could really understand it. For the first time, I got a simple set of concepts behind choosing colors. Without going back to the article, just what I remembered: 1) Choose complements. 2) Mix them with each other until they dull down a bit 3) Make some other neutral color ( possibly by mixing them in equal parts ? ) and then y…

> (OK -- just considering is there any connection between color theory and the basis of a vector field?) You’re looking for https://en.wikipedia.org/wiki/Grassmann%27s_law_(optics) The same Grassmann was (arguably) the creator of linear algebra, several decades before anyone in the mainstream mathematics community took it seriously. > I understand how to experts, it seems like the wrong advice. But I felt I understoo…

:)

I was going to reply with, "Yes, but the distinction in this case is that at least this presented color model is roughly correct, in that it is part of a chain of successively more correct models, that has significant overlap with what's real."

But then I pressed myself for -- what exactly is that overlap? I mean, creationism...flat earth theory, have some overlap with the evidence. They are models. People criticise them because they don't overlap as much with the evidence as other models.

In this case, I realized I didn't know enough about the topic to know how much the presented model ( about color theory...which I like and find comprehensible ) overlaps with the "reality" or "the rest of the evidence" about it.

So my objection to comparing this color theory I like to other models that have been widely invalidated...is simply personal. I don't know enough about the data about color to make any substantive argument about why it's different. I feel it must overlap more with the "reality" of color than the other models. Because it makes sense to me, I can see the logic and it matched my impressions about color and was useful to me. And I trust my instincts. ( There is something more in that I'll come to in a minute )

It's sort of uncomfortable to realize I don't know enough about it to refute objections to my fav new theory with anything more than "But I really like it and I can see the truth to it." But at the same time, I'm okay with that. I'm not going to learn more about the data to be able to offer these objections. I think mainly because...this theory is useful enough to me. It works for what I need right now. And matches the pace I want to learn things about this at.

From an economic argument -- this model has utility to me, so I selected it, as opposed to alternatives.

I really appreciated your link to Grassmann. I was super happy that my instincts overlapped with the guy that invented linear algebra.

Which brings me to another point. Science is sometimes uncomfortable because you realize that what is accepted my a lot of people, goes against your instinct, or your direct experience.

I think there's something really important in this. And I don't think it's so simple as "well that means you're wrong" -- I think it's the case that the following are true:

When your instincts are against the majority opinion. Either: 1) they're onto a more valid model than you, more likely, or 2) you're onto a more valid model than them and they've missed something, less likely, and yet that's the history of science ( and startups! ), or 3) the relative levels of validity do not matter to you because it has more personal utility for you, at that point in your life, to believe the model you like than something else.

I like the third point -- because in there is room for tolerance of diversity based on the idea of personal utility. As long as the utility doesn't cause significant cost to anyone else, then trusting your instincts in the face of evidence, even if you're wrong, can still be the choice that maximizes personal utility for you at that point.

Again, this comment might be too long...but I thought it useful to explore my vulnerability to realizing I didn't know enough, but I liked it anyway -- in this forum, so other people could see that maybe when you get to that point, it doesn't always have to result in fighting...but there can be something to learn from it. I think people here will appreciate that--but if not, I guess this type of comment is better as a blog post or personal note.

Personal utility functions over lifepaths -- it's a complex landscape out there!

Re: Practical Color Theory for People Who Code

#70
post #53

If you want to do something meaningful with colors, don't use RGB, and don't use HSL (which is based on RGB). These spaces are problematic. For instance, pure blue and pure green in RGB space have very different lightness. Here's a picture of the region of colors covered by RGB: https://en.wikipedia.org/wiki/HSL_and_HSV#/media/File:Srgb-i... If RGB space corresponded to what our eyes saw, that would be a perfect hexa…

The article is about subjective design choices. Any color space is fine for that as it's only used to pick colors. Generally, though, what to use working with colors greatly depends on what you are doing and I'm pretty sure most of the time where you think you need CIELAB, HSL with luma for Lightness would do just fine, heck, even jpeg's native YCbCr or RGB might do. It's just not a good advice to avoid RGB or HSL si…

Well, for the most part, the color space we're accessing is the exact same, so you can always use whatever space you please. The biggest problem with things like RGB is that color selection ends up turning into a horrible mess of seemingly unrelated magic numbers.
Post reply on HN