First-class colors (Part 1)

Can you please give me an link to the project so that I can export it? I cannot currently do that, I am having some trouble finding the link.

Could you explain your mix algorithm and why you think it's correct? Can you cite a reference I can read? (Save me the trouble of hunting through Wikipedia...)

I haven't gotten to mixing yet; I'm still working on


It's good that you folks started this thread because I'm unearthing bugs in the existing Colors and Crayons library while working on this. Maybe the worst bug was that somehow the X11 color list was truncated to the first 100 entries. (There are 665 X11 color names.) I hope this isn't a Snap! bug.

Well, Something has obviously happened, :pouting_cat: Well go fix it! ASAP!

Ummm, when I run it I find that there is a Undefined! block

Here's the reference (about light/pigment mixing):
StackOverflow post
My algorithm is to get [percentage]% of the first color and [100-percentage]% of the second color, and then there's a dropdown menu with the options light and pigment. If the user selects pigment, it subtracts the two values, and if they select light, it adds them. Then makes a color out of those.
I hope that was explained well. I'm 95% sure it's correct, but it's also fairly simple, so I don't think I know how to explain why. (I hope that was explained well too lol.)

You didn't export all the blocks required

I had a small workaround because with all the exporting my download folder is getting quite crazy, so I made a workaround like this :

Delete some things you don't need

What things are wrong?

Oy gevalt. Now I remember why I don't read StackOverflow. The only answer I trust out of that circus is the person who said

The correct answer is NO, because there is no correct working model of how "color mixing in the real world" really works. It is FAR too complex and conditional and not really at all like the simple Red-Blue-Yellow stuff that we learned in school (it in fact requires all of Chemistry and a lot of Physics and Biology to resolve).

But I feel very confident that actual pigment mixing is subtractive, and actual light mixing is additive. When you mix a lot of colors of paint you end up with black. (Actually with a muddy brown, because Chemistry, but in principle black.) When you mix a lot of colors of light you end up with white. (Think theater or disco.) And, you know, in your TV, when they want white they turn on all three LEDs, and when they want black all they can do is not turn on any of them; that's why mediocre TVs can't really show black and instead you see a sort of greenish gray. (Better TVs still can't project "black light" but fake it with a less reflective screen surface than typical glass.)

Why paint is different

The physics and chemistry part, with respect to paint, is that what we see as red paint (for example) doesn't do anything special with red. Rather, it absorbs all colors of light other than red. Whatever isn't absorbed is reflected into your eyes. When you mix colors, more and more wavelengths of light are absorbed, and little or nothing is reflected, hence black.

So, bottom line, I don't trust an answer for light that involves subtraction.

... but your project does get the right answer for red and yellow? Not sure.

Nope.

By the way, why are you using 255,220,0 for yellow rather than 255,255,0?

What??? Why is the last input not a read-only dropdown?
Anyway, that is the right answer for pigment. for light it reports black, which I'm not too confident is right.

I think it is because 255, 255, 0 WOULD BURN YOUR EYES OFF!

Pigment isn't what's interesting here. Nobody is painting your computer's screen; we are shining lights on it!

Yeah. Pigment subtracts, light adds.

Ha ha.

I don't know, the pause button is 255,220,0 yellow, and I was working with the pause symbol a lot so i figured to use that for some reason??????????