Live data from Hacker News

Show HN: Do you know RGB?

maxwellito.github.io

21–30 of 64 posts

Re: Show HN: Do you know RGB?

#21

> do you know rgb > colours are in hex am I missing something or being dumb?

It's a shortened form of hex colors from CSS, but it does correspond to RGB since the first character of the hex value is the R, the second character is the G, and the third is the B. So for instance, a hex value from this game of #F18 means the red is F (out of F), the green is 1 (out of F), and the blue is 8 (out of F).

Re: Show HN: Do you know RGB?

#22

> do you know rgb > colours are in hex am I missing something or being dumb?

This is hexadecimal notation for rgb. Each character represents 2 bytes, which encode a value from 0 to 255.

This is a bit more confusing because this is a shorthand notation: you’d actually need 2 hexadecimal characters for 2 bytes (eg #0077ff would be rbg(0, 127, 255)). In this shorthand notation, I think there’s an implied 0 (eg #07f is #0070f0).

So you can’t represent all rgb colour with only 3 characters, but for this use-case it’s fine.

In css you can use either of these 3 notations, for example

Re: Show HN: Do you know RGB?

#23
post #18

I like it, but when you make your guess the mystery color should change to the color it describes, not to green or red. You should use some other aspect to indicate success - shape, motion, font, anything other than color. You already have it shaking for an incorrect guess, so that’s good.

Yeah that green tripped me up.

Re: Show HN: Do you know RGB?

#26

> do you know rgb > colours are in hex am I missing something or being dumb?

This is hexadecimal notation for rgb. Each character represents 2 bytes, which encode a value from 0 to 255. This is a bit more confusing because this is a shorthand notation: you’d actually need 2 hexadecimal characters for 2 bytes (eg #0077ff would be rbg(0, 127, 255)). In this shorthand notation, I think there’s an implied 0 (eg #07f is #0070f0). So you can’t represent all rgb colour with only 3 characters, but fo…

In CSS, #07f is the same as #0077ff. (i.e. double each symbols)

Re: Show HN: Do you know RGB?

#27

Definitely don't make the game end dafter one wrong guess. At least give me some lives or something, damn. Or, better yet, just let me play to the end, then give me my score.

I feel that way. Also there are many cases where I can eliminate two choices as obviously wrong but can’t tell the difference between two similar shades. I wouldn’t feel bad getting disqualified for a gross error but when it is two shades of bluish-green it doesn’t seem fair.

Another possibility is to give it more of a tournament feel where the early cases are easy and the last ones are hard so I get disqualified at 15/20 (webdev and photographer who does gfx programming for fun) but a real goldeneye could go further. 3/20 does not represent my skill.

Re: Show HN: Do you know RGB?

#30
post #8

I’m so confused. This is something people know? I mean, I can work it out from first principles knowing how color mixing works, but it sounds like people just … know them? I’ve been programming for almost 40 years and it would never have occurred to me to memorize this sort of thing.

4096 colors is not too much to memorize.

In the English language, they call it "red"

In the programming language, we call it "f00"

4096 words for colors!

Post reply on HN