News for hackers. Stuff that matters.
Re:Guess My RGB by pierrelf on Sunday March 31, 2024 @05:34AM (#39882755)
Amazing! Just needs an expert mode with 0-255 and alpha channel
Re:Guess My RGB by pavlov on Sunday March 31, 2024 @06:19AM (#39882960)
Real expert mode is guessing CIE 1931 XYZ values in a windowless room with a carefully calibrated display and ambient lighting.
Re:Guess My RGB by LoganDark on Sunday March 31, 2024 @06:21AM (#39882967)
You also might need calibrated eyes. (My left and right eyes don't see the same colors.)
Re:Guess My RGB by pavlov on Sunday March 31, 2024 @05:37AM (#39882768)
After submitting, the background color of the box displaying the match percentage result shows you the color you guessed.

(This may be obvious depending on the color you’re guessing, but in my case the color was quite gray and it took me a few guesses to notice this essential visual aid.)

Re:Guess My RGB by bun_terminator on Sunday March 31, 2024 @05:42AM (#39882784)
Fun! Spill your scores. I can usually get within 85%, had one perfect out of 10. And one 70%
Re:Guess My RGB by envp on Sunday March 31, 2024 @05:52AM (#39882832)
So far I’ve gotten to the end for a few colors. Quite fun, took my about 20-30 guesses!
Re:Guess My RGB by a_e_k on Sunday March 31, 2024 @06:03AM (#39882892)
Fun! After a few game, my best was 100% on the 4th guess.

It looks like it's using Euclidean RGB difference, so one potential approach if you don't want to eyeball it is to just try to try to find the match for each channel one by one.

Edit: Okay, my new best score was 100% on the 1st guess, thanks to the browser inspector. :-)

Re:Guess My RGB by williameckert on Sunday March 31, 2024 @06:20AM (#39882964)
First game: 77 % on the first try, Splendid! on the second.
Re:Guess My RGB by Applejinx on Sunday March 31, 2024 @07:19AM (#39883224)
I thought it just always said 'splendid!' at the end. Tried twice, got both within six tries. I've paid attention to this sort of thing before, though. If I could get it close I'd generally have an idea as to what was left to change. I could see 'this is more red than it should be' and go from there.
Re:Guess My RGB by B1FF_PSUVM on Sunday March 31, 2024 @06:04AM (#39882902)
Five games, number of tries to "Splendid!": 9, 4, 11, 19, 8

(Burnt orange, bright yellow, light blue, shock pink, dark blue)

Re:Guess My RGB by johnisgood on Sunday March 31, 2024 @08:55AM (#39883832)
2 games, one was correct at the 27th try, the second one at the 14th.
Re:Guess My RGB by trashtensor on Sunday March 31, 2024 @01:13PM (#39886013)
8-12 attempts to get the color seems to be the range i tend to land in.
Re:Guess My RGB by thehucklecat on Monday April 01, 2024 @08:49AM (#39893588)
i got 6. surprised that it was that few, I figured it would take forever.
Re:Guess My RGB by DangerousPie on Sunday March 31, 2024 @05:53AM (#39882842)
Fun! This takes me back to coding up websites in plain HTML in Notepad. Coming up with the right hex codes for colors was an essential skill!
Re:Guess My RGB by panchtatvam on Sunday March 31, 2024 @05:54AM (#39882848)
Loved it !
Re:Guess My RGB by Timwi on Sunday March 31, 2024 @06:01AM (#39882885)
Would love to try a “Guess my HSL” spinoff.
Re:Guess My RGB by rikroots on Sunday March 31, 2024 @07:07AM (#39883176)
Not a "Guess my OKLCH" game as such - more of an "Order my gradient numbers" thing - but it does use OKLCH ... https://codepen.io/kaliedarik/full/YzvYadX
Re:Guess My RGB by speedgoose on Sunday March 31, 2024 @07:06AM (#39883170)
Re:Guess My RGB by ricardo81 on Sunday March 31, 2024 @06:06AM (#39882908)
Only took me 18 guesses. Should've thought about ROYBGIV a bit before guessing.
Re:Guess My RGB by ldjb on Sunday March 31, 2024 @06:59AM (#39883144)
Heads-up: It's ROYGBIV
Re:Guess My RGB by ricardo81 on Sunday March 31, 2024 @08:17AM (#39883577)
Pretty fundamental to this situation :-) cheers.
Re:Guess My RGB by new_user_final on Sunday March 31, 2024 @07:06AM (#39883168)
Took me 42 guesses.
Re:Guess My RGB by p4bl0 on Sunday March 31, 2024 @06:26AM (#39882996)
Very cool idea! On my first two tries, I quickly got to 94% but then got absolutely stuck there. The 94% seemed like a local optimum (moving any slider one slot in either direction

Any way to explain that?

Also: it would be cool to have a way to forfeit and get the solution.

Re:Guess My RGB by neogodless on Sunday March 31, 2024 @08:26AM (#39883642)
I had this issue. Didn't realize that on my phone I was fat-fingering and struggling to get exactly one movement on a slider instead of two.
Re:Guess My RGB by p4bl0 on Sunday March 31, 2024 @08:30AM (#39883661)
Oh, that's probably it!
Re:Guess My RGB by miggol on Sunday March 31, 2024 @07:08AM (#39883179)
The score is defined as follows:

      function score (r, g, b, rr, gg, bb) {
        const maxRErr = Math.max(r, 15 - r)
        const maxGErr = Math.max(g, 15 - g)
        const maxBErr = Math.max(b, 15 - b)
        const maxDist = Math.sqrt(maxRErr * maxRErr +
                                  maxGErr * maxGErr +
                                  maxBErr * maxBErr)
        const rErr = Math.abs(rr - r)
        const gErr = Math.abs(gg - g)
        const bErr = Math.abs(bb - b)
        const dist = Math.sqrt(rErr * rErr +
                               gErr * gErr +
                               bErr * bErr)
        return Math.floor(100 * (1 - dist / maxDist))
      }
Before even starting to count the error, it calculates the maximum error possible for the target colour. That makes sense! We want the percentages to feel more or less the same every round. Otherwise a medium grey would score relatively higher with every guess.

But to answer your question, I don't think the local optimum situation you are describing is possible. I'm no math wizard but looking at this function there must (surely?) always be a direction to move one slider to get a higher score, unless you're bang on. So I think you just missed out on that one move, which does get ever more likely as your guesses get closer.

Re:Guess My RGB by otherme123 on Sunday March 31, 2024 @06:51AM (#39883116)
94% means you need only one slide up or down, so 6 posibilities. If you move one and it doesn't solve, you can't move another without getting the first to the old position.
Re:Guess My RGB by aiprogress on Sunday March 31, 2024 @06:36AM (#39883034)
I don't think that's possible. When I tried it, if you only pick one number the percentage match goes up or down.
Re:Guess My RGB by chrisjj on Sunday March 31, 2024 @06:42AM (#39883075)
Bug? #952 shows matching colour but scores only 94%.

Android Chrome.

Re:Guess My RGB by susam on Sunday March 31, 2024 @07:45AM (#39883356)
The actual colour may have been #950 or #951 which looks very similar to #951.

Pulling the blue slider down by a notch or two could have got you a perfect match.

Here is a demo of these colours if you want to see for yourself how similar they look:

https://susam.net/code/bin/2024-03-31-rgb-952.html

Re:Guess My RGB by chrisjj on Monday April 01, 2024 @06:01AM (#39892411)
Thanks. Colour was identical.
Re:Guess My RGB by otherme123 on Sunday March 31, 2024 @07:19AM (#39883220)
RGB tells you that #952 is as far from #951 as, for example #952 is from #851, or from #962. They aren't. The first two are very close, practically the same to the eye.
Re:Guess My RGB by jstanley on Sunday March 31, 2024 @06:57AM (#39883135)
I think to ensure readability it caps the colour at the lower end, so #950, #951, #952 all show up the same.

That's my best guess.

EDIT: But from reading the code there seems to be no such logic. Strange, because I observed the same thing, in Firefox on Android.

Re:Guess My RGB by chrisjj on Monday April 01, 2024 @11:40AM (#39895341)
Certainly something odd is happening.
Re:Guess My RGB by leononame on Sunday March 31, 2024 @06:43AM (#39883078)
Just joining in on the canon that this is incredibly fun, much more than I would've anticipated
Re:Guess My RGB by somedude895 on Sunday March 31, 2024 @06:44AM (#39883081)
I sometimes play this with people at work. Point at something in the office and guess the RGB.
Re:Guess My RGB by ramshanker on Sunday March 31, 2024 @07:06AM (#39883167)
22) #5A7 (Splendid!)
Re:Guess My RGB by elyobo on Sunday March 31, 2024 @07:15AM (#39883205)
Fun game, a convenient wordle style social media sharing utility would spread the word. Not sure what would work.
Re:Guess My RGB by animaomnium on Sunday March 31, 2024 @08:58AM (#39883846)
One idea is to embed the guesses in the url fragment (perhaps delta encoded) and from that url fragment, generate a social media preview image with a horizontal discrete gradient of the guesses.

You would need a server to generate the preview images ofc, but something like a subdomain redirect to a cloudflare worker or what-have-you could be sufficient. If done right the generated previews could be pretty small.

Re:Guess My RGB by mg on Sunday March 31, 2024 @07:18AM (#39883218)
I wonder what the optimal strategy would be if you can't see the color and only the answers when you click submit.

Hillclimbing is already somewhat efficient:

    For each slider:
        - Start at 0
        - Move to the right until the score drops
        - Move one to the left
That should result in something like 9 tries per slider on average, so 27 tries per color.

One signal that could be used to improve it: The difference in score between 0 to 1 gives you the approximate length you have to move to the right.

Due to rounding, you don't get the exact length.

So My guess is that with an optimal strategy, on average you would need something like 4 tries per slider.

That comes down to and average of 12 tries per color.

Re:Guess My RGB by elsombrero on Sunday March 31, 2024 @07:55AM (#39883440)
you could apply a binary search for each slider and improve the number of tries by moving the slider by half of the shortest distance to the edge
Re:Guess My RGB by tetris11 on Sunday March 31, 2024 @08:33AM (#39883694)
Poor man's attempt:

        var speed = 50
        // Prime the result output
        for (col of [rin, bin, gin]) {
          rin.valueAsNumber = 0
          bin.valueAsNumber = 0
          gin.valueAsNumber = 0
        }
        rin.dispatchEvent(new Event('change'));

        async function tryit(col, incr) {
          // Increment a single color
          col.valueAsNumber = col.valueAsNumber + incr
          col.dispatchEvent(new Event('change'));
          submit.click()
          await (new Promise(resolve => setTimeout(resolve, speed)));
          var res_text = result.innerText.split(/[ ()%]/)[4]
          if (res_text === "Splendid!") {
            throw new Error("Finished")
          }
          return (parseInt(res_text))
        }

        async function trymany() {
          // We need to iterate at least twice due to rounding
          // in result percentage, sometimes making neighbouring 
          // colors have the same result. 
          var last_res = 0, max_tries = 3;
          while (--max_tries > 0) {
            for (col of [rin, gin, bin]) {
              while (true) {
                var new_res = await tryit(col, 1)
                if (last_res >= new_res) {
                  // set last value and break
                  await tryit(col, -1)
                  break
                }
                last_res = new_res
              }
            }
          }
        }
        await trymany()
Re:Guess My RGB by js4ever on Sunday March 31, 2024 @02:21PM (#39886641)
Not bad, 18 to 43 attempts on 10 games I tried. Far from optimal but good enough :p
Re:Guess My RGB by tetris11 on Sunday March 31, 2024 @03:15PM (#39887151)
I had an updated version which implemented a binary search, but I couldn't update my previous comment so I dropped it. That being said, due to the scoring function `score(r,g,b,rr,gg,bb)` giving the exact same score sometimes for neighbouring colors, the search would still have to repeat and wasn't much more optimal than the code you see above.
Re:Guess My RGB by sleepingreset on Sunday March 31, 2024 @05:09PM (#39888086)
how do you run this?
Re:Guess My RGB by andy_ppp on Sunday March 31, 2024 @06:18PM (#39888592)
I imagine pasting into the JS console after inspecting the page?
Re:Guess My RGB by sleepingreset on Monday April 01, 2024 @11:58AM (#39895595)
nvm thought it was bugged. user issue not code
Re:Guess My RGB by sunnynagam on Tuesday April 02, 2024 @06:48PM (#39911693)
Optimized with binary search (can't figure out why ycomb formats my code all ugly)

var speed = 500;

[rin, bin, gin].forEach(col => { col.valueAsNumber = 7; col.dispatchEvent(new Event('change')); col.score = 0; });

async function tryit(col, value) { col.valueAsNumber = value; col.dispatchEvent(new Event('change')); submit.click(); await new Promise(resolve => setTimeout(resolve, speed)); var res_text = result.innerText.split(/[ ()%]/)[4]; if (res_text === "Splendid!") { throw new Error("Finished - Found correct combination"); } col.score = parseInt(res_text); return col.score; }

async function binarySearch(col) { let start = 0; let end = 15; let mid = 7; let startAccuracy = await tryit(col, start); let endAccuracy = await tryit(col, end); let midAccuracy = 0;

    while (true) {
        mid = Math.floor((start + end) / 2);
        midAccuracy = await tryit(col, mid);

        if ((end - start) <= 2) {
            const max = Math.max([startAccuracy, midAccuracy, endAccuracy]);
            if (startAccuracy == max) await tryit(col, start);
            else if (midAccuracy == max) await tryit(col, mid);
            else await tryit(col, end);
            return;
        }

        if (endAccuracy > startAccuracy) {
            start = mid;
            startAccuracy = midAccuracy;
        } else {
            end = mid;
            endAccuracy = midAccuracy;
        }
    }
} async function findOptimalCombination() { for (const col of [rin, gin, bin]) { await binarySearch(col); } /* rounding */ for (const col of [rin, gin, bin]) { const mid = col.valueAsNumber; const score = await tryit(col, mid); const left = await tryit(col, mid - 1); if (score >= left) { const right = await tryit(col, mid + 1); if (score >= right) await tryit(col, mid); } } console.log("Optimization complete"); }

await findOptimalCombination();

Re:Guess My RGB by tetris11 on Friday April 05, 2024 @06:26AM (#39940753)
This is great -- it has a very consistent performance of ~20 steps. I notice that my naive attempt seems to be faster in some cases.
Re:Guess My RGB by SmartHypercube on Sunday March 31, 2024 @08:38AM (#39883729)
If we ignore the information contained in the score numbers, only comparing which score is higher, we could optimize using ternary search (or golden-section search). https://en.wikipedia.org/wiki/Golden-section_search

(Note that binary search does not apply here. This is searching for an extremum, not a zero point.)

    - Start at the range of 0-F, measure the score of 6 and 9 (2 tries)
    - Depending on which is higher, narrow the range to 0-9 or 6-F
    - Suppose the range is 0-9, measure the score of 3 and 6 (1 try. 6 is already measured)
    - Narrow the range to 0-6 or 3-9
    - Suppose the range is 0-6, measure the score of 2 and 3 (1 try. 3 is already measured)
    - The worse case is 3's score is higher. The range is now 2-6. Since 2, 3, 6 are all measured, in the worst case you need 2 more tries for 4 and 5.
    - The other case is 2's score is higher. The range is now 0-3 and 0, 2, 3 are all measured.
So in worst case there are 6 tries per slider. ~5 tries on average. I suspect this can be further optimized but I'll stop here :)
Re:Guess My RGB by alex_smart on Sunday March 31, 2024 @09:02AM (#39883880)
Assuming the score is 100-Euclidean distance, you should be able to triangulate to the correct answer after three random guesses. Triangulation will give you two candidates for the correct colour, so if you choose between them randomly you should get the correct colour in 4.5 tries on average.
Re:Guess My RGB by n2d4 on Sunday March 31, 2024 @02:03PM (#39886484)
Because the space is bounded and discrete, you can further optimize by triangulating smartly. If you always pick a triangulation point on the boundary, you will always end up with a single candidate as the other candidate will be out of bounds. (Due to discreteness, you can only pick a point near the boundary, but this will still work in a vast majority of cases.) That reduces the average to ~4.
Re:Guess My RGB by penteract on Sunday March 31, 2024 @03:11PM (#39887120)
The score is floor(100*(1-distance/max_distance)) where max_distance is the greatest distance to the target from any point in the cube. This means that the spheres used in triangulation look funny. Rounding also gets in the way, but you can do it in 5 guesses starting with #B74, #448, #B8B and #4B7 (the first 3 are enough in to uniquely identify it in 3911 out of 4096 cases, and the first 2 are enough in 735; giving an average of less than 4 tries).
Re:Guess My RGB by alex_smart on Sunday March 31, 2024 @05:17PM (#39888144)
Excellent work!

We can also probably prove that 3 guesses are not enough by some sort of adversarial argument. That is, instead of having the color be fixed at the start, imagine that the game picks the colors adversarially to try to make the job of the guesser as difficult as possible, while remaining consistent with the answers it has already given. If we can pick a function for the adversary that does not fully disambiguate the color completely for any sequence of three guesses, we will be done.

Re:Guess My RGB by penteract on Sunday March 31, 2024 @05:46PM (#39888348)
I wouldn't be surprised if there is a way of doing it in 4 guesses (3 to identify and a 4th that's known to be right), although you probably need to adjust the later guesses based on the results of the first. It wouldn't be impossible to search the space of strategies exhaustively. Precomputing the score function (and storing it as 4096*101 4096-bit bitstrings for efficient set intersection) would speed things up, and it could be a chance to use the 3D texture handling features of a GPU (I've done very little GPU programming so take my enthusiasm with a pinch of salt).
Re:Guess My RGB by n2d4 on Sunday March 31, 2024 @05:48PM (#39888362)
There's a way to do it in 4 guesses, I described it here: https://news.ycombinator.com/item?id=39888130
Re:Guess My RGB by alex_smart on Sunday March 31, 2024 @05:55PM (#39888418)
I meant 3 tries in total, not just the random guesses.
Re:Guess My RGB by KineticLensman on Sunday March 31, 2024 @09:53AM (#39884266)
I just tried this and it took 12 goes to get "12) #02C (Splendid!)". Admittedly the target colour was very blueish, so I started with the blue slider and then added a couple of green clicks.
Re:Guess My RGB by penteract on Sunday March 31, 2024 @10:05AM (#39884380)
It's calculating distance in 3D space, scaled by the longest distance available. Without the scaling (and ignoring the rounding for the moment), distances from the target to any 3 non-collinear points would narrow it down to at most 2 options, regardless of the precision required on each axis; giving a 50% chance to get it on guess 3 and a 50% chance to get it on guess 4.

With the scaling, it can still be thought of as a problem of intersecting spheres, but the spheres begin to look quite strange since the distance function isn't symmetric. For example if your first guess was a corner of the cube, 1/8 of the space would have the same score (0%) since you've picked the furthest available point. This probably could be analyzed in the same way as above, since the 'spheres' centered at non-corner points aren't degenerate, and their intersections probably still have the right topological dimensions (dropping by 1 each time you add a new sphere, so 3 spheres are still likely to take you to a finite set of points in the continuous case) but that would require some work to prove.

Since we still need to consider the loss of precision from rounding, we can just look at this as a discrete problem and try to find a tuple of points that are sufficient to distinguish everything. It took a me couple of attempts, but the following 4 tetrahedrally arranged ones work: [11,7,4],[4,4,8],[11,8,11],[4,11,7].

There might be a smaller set that work, it would take ~2^48 work to exhaustively search for 3 points that could distinguish everything, and it might be possible to do better since you can choose the second point based on results from the first.

Re:Guess My RGB by mg on Sunday March 31, 2024 @10:34AM (#39884647)
So after calculating the 4 scores for [11,7,4],[4,4,8],[11,8,11],[4,11,7] we can put the 4 scores into a formula and it outputs the correct 3 values? Which formula would that be?
Re:Guess My RGB by penteract on Sunday March 31, 2024 @12:31PM (#39885657)
I didn't have a formula, just a Javascript object with 4096 keys. You could try to use a formula, but the rounding would make it quite blurry, so an "exact" answer wouldn't necessarily be right.
Re:Guess My RGB by penteract on Sunday March 31, 2024 @01:52PM (#39886370)
Here's the code to generate the object and check that it works: https://gist.github.com/penteract/8957d7d18a60f021d8d74ef2f4...
Re:Guess My RGB by CobrastanJorji on Sunday March 31, 2024 @03:37PM (#39887339)
This is beautiful! Simple and effective.
Re:Guess My RGB by nvader on Sunday March 31, 2024 @01:44PM (#39886288)
Could you binary search on the slider to find the optimum?
Re:Guess My RGB by n2d4 on Sunday March 31, 2024 @05:16PM (#39888130)
Here's a solution with ~3.27 average tries total (including the last guess). It works by spreading the possibilities across each of the 100 "score" buckets as evenly as possible (aka minimizing the variance).

It can identify more than half of all colors in just 2 guesses. If you edit the code to minimize the size of the largest bucket instead, you get an algorithm that has a slightly worse average case, but never needs more than 4 guesses.

Paste it in the site's browser console to try.

    function solve() {
      let possibleTargets = new Array(0x1000).fill(0).map((_, i) => i);
      while (true) {
        // for each possible guess, calculate the score-buckets
        const guessResults = possibleTargets.map((guess) => {  // for better brute-force, iterate through all colors, but this performs better (probably because we don't reward for guessing correctly in the current turn)
          const buckets = new Array(101).fill(0).map(() => []);
          for (const possibleTarget of possibleTargets) {
            buckets[calcScore(possibleTarget, guess)].push(possibleTarget);
          }
          return { guess, buckets };
        });

        // find guess with lowest variance
        const best = guessResults.sort((a, b) => calcVariance(a.buckets) - calcVariance(b.buckets))[0];

        // make the guess & update possible targets
        const sc = makeGuess(best.guess);
        if (sc >= 100) return "Success!";
        possibleTargets = best.buckets[sc];
      }
    }

    function calcVariance(buckets) { const maxBucketSize = Math.max(...buckets.map(b => b.length)); return buckets.reduce((acc, b) => acc + (b.length - maxBucketSize) ** 2, 0); }

    function deconstruct(color) { return [(color & 0xF00) >> 8, (color & 0x0F0) >> 4, (color & 0x00F)]; }

    function calcScore(target, guess) { return score(...deconstruct(target), ...deconstruct(guess)); }

    function makeGuess(guess) { [rr, gg, bb] = deconstruct(guess); submitInput(); return score(r, g, b, rr, gg, bb); };

    solve();
Re:Guess My RGB by penteract on Sunday March 31, 2024 @06:59PM (#39888975)
That's great. What's the first guess? And does this prove that there is no way of identifying the answer in 2 guesses? I tried running a version of your code across all targets, but my current machine isn't up to it (and there are obviously more efficient ways that you've probably implemented).

I'd like to try out a few alternatives in place of your variance function. Something like b.length*log(b.length) to estimate the expected number of guesses, and perhaps using a version of log closer to ceil(log(x)/log(100)).

Re:Guess My RGB by Taek on Monday April 01, 2024 @12:33AM (#39890931)
You can do 2 guesses if you get lucky. If you want to assume worst possible luck you can't even do it in 3, you need 4.
Re:Guess My RGB by n2d4 on Wednesday April 03, 2024 @03:23PM (#39921851)
The first color is #015.

Regarding computing it for all targets, I optimized it by precomputing the value of guessResults in the first iteration, since it's always the same (no matter the target color), which saves most of the computation. I removed the optimization so the code wouldn't be so long here.

Re:Guess My RGB by kevin_thibedeau on Sunday March 31, 2024 @08:32PM (#39889615)
Binary search on each channel is the optimal general solution without starting from an educated guess on the first try. This is how a successive approximation ADC performs a conversion.
Re:Guess My RGB by Taek on Monday April 01, 2024 @12:35AM (#39890941)
You can do a lot better than binary search because you get a weighted score for each guess.
Re:Guess My RGB by saintradon on Monday April 01, 2024 @01:01PM (#39896304)
What is this next best option called? A weighted binary search?
Re:Guess My RGB by pinkmuffinere on Sunday March 31, 2024 @08:49PM (#39889733)
You should be able to use BFGS to search for the optimal vector [r, g, b] [1]. BFGS estimates the hessian, and then takes a step in the right direction, so you don’t need any derivatives (the score should be enough).

[1] https://en.wikipedia.org/wiki/Broyden%E2%80%93Fletcher%E2%80...

Re:Guess My RGB by ldjb on Sunday March 31, 2024 @07:32AM (#39883276)
It's not linked to from the page, but here's the GitHub repo for anyone interested:

https://github.com/susam/myrgb

Re:Guess My RGB by cjk2 on Sunday March 31, 2024 @07:35AM (#39883297)
This is my party trick. Describe a colour and I'll give you the hex code.

As you can imagine I'm really popular at parties...

Re:Guess My RGB by Vvector on Sunday March 31, 2024 @08:21AM (#39883603)
There is a boardgame with this theme. First clue is just one word. Second clue is two words. Everyone places a pawn on their color guess. Points awarded based on distance. Easy to play.

https://boardgamegeek.com/boardgame/302520/hues-and-cues

Re:Guess My RGB by geoduck14 on Sunday March 31, 2024 @09:47AM (#39884217)
This is a good game if you want to be able to hold a conversation with thr people you are playing with. It gets people talking about their experiences. I've played with my own wife and learned about how much she watched TV as a child (did you know Barney changed costumes?), what she thinks of nacho cheese, lipstick, and more.

It is good for people you know as well as people you don't know. The only situation I don't recommend it is if someone in your group wants to win something because the "win" factor is weak.

Re:Guess My RGB by ketzo on Sunday March 31, 2024 @02:47PM (#39886895)
Oh my god the Barney thing has come up with every single group I've ever played that game with. Blew my mind the first time, then proceeded to blow everyone's minds every game after :D

(y'know, as much as one's mind can be blown by trivia about a children's tv show)

Re:Guess My RGB by salomon812 on Sunday March 31, 2024 @01:58PM (#39886443)
Yes! This game is a lot of fun. My only gripe with it is that the red area is small and the green area is huge, and that's really minor complaint. With the right people this game is amazing.
Re:Guess My RGB by rrr_oh_man on Sunday March 31, 2024 @08:24AM (#39883630)
A picture taken with a Soviet camera, late 1980's, nostalgia and teddy bears, carpets on the wall, dark wood juxtaposed with the lightness of youth.
Re:Guess My RGB by cjk2 on Sunday March 31, 2024 @08:36AM (#39883708)
That'd be a distinct #66666 ... very boring middle grey. But not too bright.

This would of course just be the median colour. It'd be black and white film because it was cheaper, completely incorrectly exposed so that the blacks were bang at the bottom and the film would be much too high an ISO so it'd be grainy as hell. And there would be someone with a really bad hair cut smoking in it.

Source: still own my Zenit from back then :)

Re:Guess My RGB by rrr_oh_man on Sunday March 31, 2024 @09:22AM (#39884006)
Oooh, maybe you know:

What camera / film might have been used for those sepia pictures I keep finding in my family’s old stuff?

Btw: That description with the black blacks was bang-on. Also the smoking, and the haircuts.

Re:Guess My RGB by cjk2 on Sunday March 31, 2024 @09:27AM (#39884044)
The sepia pictures are probably that colour because of the toner that was used at the time when they were printed. The silver halides used in photographic paper weren't very stable and were still quite light sensitive. Sepia toner, as well as giving an artistic view, were used to convert the unstable halides to silver sulfide which lasted a hell of a lot longer (as you found out :)

So not film or camera specific really.

Re:Guess My RGB by benrutter on Sunday March 31, 2024 @07:45AM (#39883357)
OK let's go!

A muddy yellow reminiscent of the sweet and sour fruit found across Central America and the Southern States.

(Taken from a paint description)

Re:Guess My RGB by cjk2 on Sunday March 31, 2024 @07:46AM (#39883365)
ffcc33

I'm going on supermarket starfruit here so might be a bit off :)

Re:Guess My RGB by johnisgood on Sunday March 31, 2024 @08:08AM (#39883525)
Maybe something darker like e5b934? I think we are better off giving ranges though. :P
Re:Guess My RGB by rrr_oh_man on Sunday March 31, 2024 @08:18AM (#39883582)
It's Hog Plum, if you google it. #FBCP001.

I'm disgusted and enraged. Really liked the answers better.

Re:Guess My RGB by benrutter on Monday April 01, 2024 @11:06AM (#39894911)
Yeah the answers seem like nicer colors, pretty close but too little green? #ffcc33 is beautiful btw
Re:Guess My RGB by tetris11 on Sunday March 31, 2024 @07:55AM (#39883438)
A melancholy purple reminiscent of the twilight depicted in childrens books, 1910, colorized.
Re:Guess My RGB by comradesmith on Sunday March 31, 2024 @08:04AM (#39883498)
#8855aa
Re:Guess My RGB by cjk2 on Sunday March 31, 2024 @08:00AM (#39883474)
eeeeff
Re:Guess My RGB by rrr_oh_man on Sunday March 31, 2024 @08:19AM (#39883594)
, exhaled Clara, 'Do you really want to go that stupid dance?'
Re:Guess My RGB by tetris11 on Sunday March 31, 2024 @09:28AM (#39884045)
"FACADE" came the reply
Re:Guess My RGB by hamburglar on Sunday March 31, 2024 @01:14PM (#39886021)
Now do it by answering with words interpreted as colors using the Netscape algorithm.

I once read a blog post here about how Netscape interpreted colors that are words but aren’t in the official name list, and it comes down to tossing out the non-hex characters and padding/chunking the remaining characters to make RGB numbers, so “dumptruck” might end up being yellow because it ends up being DC0. I immediately wrote a little app that interpreted all the words in /usr/share/dict/words and stuck them in a sqlite db with Lab color representations so you could query for the nearest phony color word for a specific RGB you wanted. It just showed the 100 best matches sorted by closeness, written in their actual color. Fun little spur of the moment evening project.

Re:Guess My RGB by keepamovin on Sunday March 31, 2024 @07:44AM (#39883347)
Really so much fun!

This guy produces great things. He did that micro drawing language a while back, right?

Would also be cool to have a camera link where you can select the color to guess by pointing the camera at something.

I find this guy so inspiring. He codes and creates tools like I aspire to. Just beautiful stuff!

Re:Guess My RGB by susam on Tuesday April 02, 2024 @10:29AM (#39906145)
Thank you for the kind words. Crafting these small tools is a creative outlet for me. To learn that you like these tools is both gratifying and inspiring. So thank you for leaving this comment.
Re:Guess My RGB by keepamovin on Wednesday April 03, 2024 @05:50AM (#39915326)
You’re welcome man. I love your (art) work.

One day when I get out of the rat race side of software, I would love to just focus on this kind of stuff. So satisfying and creative and beautiful.

Re:Guess My RGB by zafka on Sunday March 31, 2024 @07:45AM (#39883360)
Reminds me of this: http://yizzle.com/whatthehex/
Re:Guess My RGB by junon on Sunday March 31, 2024 @07:46AM (#39883361)
This is a lot of fun :)
Re:Guess My RGB by yakkomajuri on Sunday March 31, 2024 @07:48AM (#39883377)
As someone who knows very little about colors, it was quite fun to see how much green is a light shade of purple I got. Could probably get better at guessing base RGBs I want for thing X on a frontends I build by playing this.
Re:Guess My RGB by mmahemoff on Sunday March 31, 2024 @07:54AM (#39883429)
This is fun. I like the fact you can click anywhere, which is nice for a non-touch device. Probably would help to emphasise those slider ticks as they are almost invisible, it would it more inviting to click instead of drag.
Re:Guess My RGB by jacknews on Sunday March 31, 2024 @08:25AM (#39883634)
There are a lot of similar games, eg https://trycolors.com/games/guess-color

I use them in my code club to teach about what is light, actually, how do we perceive color, how tv and computer screens 'trick' your color perception by simply mixing RGB in the right proportions, etc.

Re:Guess My RGB by skobes on Sunday March 31, 2024 @08:53AM (#39883821)
<bug report>

I got the first one in 10 guesses, then I tapped New Game but the background didn't change and my next guess said NaN%

(Android Chrome)

Re:Guess My RGB by susam on Sunday March 31, 2024 @09:24AM (#39884017)
Thanks for the bug report. This should be fixed now!
Re:Guess My RGB by SmartHypercube on Sunday March 31, 2024 @09:01AM (#39883872)
Exact same behavior here. I got it in 24 guesses. New Game doesn't change the color and guesses show NaN%.

(Windows Chrome)

Re:Guess My RGB by xandrius on Sunday March 31, 2024 @08:58AM (#39883853)
Try on Android Firefox.
Re:Guess My RGB by brk on Sunday March 31, 2024 @09:01AM (#39883873)
Same safari mobile.
Re:Guess My RGB by Davidzheng on Sunday March 31, 2024 @08:59AM (#39883856)
same (desktop firefox)
Re:Guess My RGB by penteract on Sunday March 31, 2024 @09:04AM (#39883899)
I swear that #516 looks darker than #505 (although perhaps only against a background of #505 with #808 next to it). Something interesting is going on there with my perception of saturation.
Re:Guess My RGB by lukew3 on Sunday March 31, 2024 @09:10AM (#39883939)
I made something similar a while ago. I opted for calculating a score based on the sum of distance between each of the channel values and gave users one guess. https://lukew3.github.io/color-code-tutor/
Re:Guess My RGB by sidedishes on Sunday March 31, 2024 @09:25AM (#39884026)
This is very nice! Someone I know made one of these too a while back with a similar UI - https://gkpotter.com/projects/rgb/
Re:Guess My RGB by kookamamie on Sunday March 31, 2024 @10:06AM (#39884395)
Is the guessing done in linear or sRGB space?
Re:Guess My RGB by doctorhandshake on Sunday March 31, 2024 @10:14AM (#39884473)
Vaguely reminiscent of Specimen by Charlie Whitney and Erica Gorochow https://playspecimen.com/ … a great game if you haven’t tried it, and unusually revealing about the limits of perception.
Re:Guess My RGB by nurple on Sunday March 31, 2024 @11:12AM (#39884990)
Reminds me of a video[0] that describes Diffie-Hellman key exchange in terms of mixing color values (as globs of oil paint).

I guess in this game you're guessing the mix of primary colors, so maybe it doesn't hold the same property of difficulty in deriving the constituents?

[0] https://www.youtube.com/watch?v=YEBfamv-_do

Re:Guess My RGB by bbx on Sunday March 31, 2024 @11:13AM (#39884996)
It's funny. I just finished writing a lesson where I teach about different color formats. In it, I explained how difficult it was to choose a color with rgb values, because that's not how humans think about color. This game is a great example of that.

HSL is much more intuitive. As soon as you have an idea of the hue scale, it's very easy to define a color with saturation and lightness levels.

Re:Guess My RGB by Daub on Sunday March 31, 2024 @11:16AM (#39885015)
Completely agree about HSL being the 'thinking' color space. As an exfersise, I get my students to define the difference in the colors they are wearing using HSL.

If you think RGB is hard to conceptualize, try Lab.

Re:Guess My RGB by mansarip on Sunday March 31, 2024 @11:14AM (#39885003)
my eyes!
Re:Guess My RGB by antonpuz on Sunday March 31, 2024 @11:27AM (#39885109)
What's the problem? just check the background color in inspect element and normalize to 16 levels :) haha

But really, good job! very nice game, fun and challenging

Re:Guess My RGB by CuriouslyC on Sunday March 31, 2024 @11:31AM (#39885157)
Landed on a high blue, guessed #00CC00, was correct, closed the browser. Kind of interesting I suppose though maybe more granularity so that I can't so easily guess?
Re:Guess My RGB by azeemba on Sunday March 31, 2024 @12:03PM (#39885423)
Ha this reminds me of a game me and my friend made a few years ago: http://rbgnrgb.com/

You play as RBG fighting monsters with different RGB values.

Re:Guess My RGB by ssimono on Sunday March 31, 2024 @12:30PM (#39885648)
Reminds me of something similar I made a few years ago: https://github.com/ssimono/hexliterate It still works, that's a multiplayer real-time game
Re:Guess My RGB by chrismorgan on Sunday March 31, 2024 @12:56PM (#39885866)
#f09 hurt.
Re:Guess My RGB by jsf01 on Sunday March 31, 2024 @01:13PM (#39886010)
This is unintentionally a great ad for perceptual color spaces. I found it easier to ignore the color and just look at the percentage changes after a while when zeroing in on a guess. I wonder if that would be different in a game of Guess My OKLCH!
Re:Guess My RGB by ivanjermakov on Sunday March 31, 2024 @02:45PM (#39886870)
I noticed that percentages are not quite accurate to perception when color is really close (it seems to cap at 95%).
Re:Guess My RGB by htk on Sunday March 31, 2024 @01:42PM (#39886268)
I LOVE this. I'll become RGBruceLee if I play this enough.
[dead]
Re:Guess My RGB by nick238 on Monday April 01, 2024 @01:16PM (#39896494)
Did it work?
Re:Guess My RGB by salomon812 on Sunday March 31, 2024 @01:56PM (#39886415)
For those that love this game (as I do) I recommend "I Love Hue" for mobile.
Re:Guess My RGB by blt on Sunday March 31, 2024 @02:04PM (#39886492)
Agree, that game is great for anyone who enjoys a color perception challenge!

I just bought my first OLED phone, maybe it's time to play again.

Re:Guess My RGB by tamimio on Sunday March 31, 2024 @01:58PM (#39886438)
Love it, first one took 15 steps, second one took only 4!
Re:Guess My RGB by blt on Sunday March 31, 2024 @02:08PM (#39886526)
Curious if anyone can see the difference between #DD2 and #DD3. It was impossible on my 2013 Retina Macbook.
Re:Guess My RGB by chrisjj on Monday April 01, 2024 @07:07AM (#39892808)
I can on Samsung phone. But the difference is tiny. You found two of the closest colours in the space.
Re:Guess My RGB by hivacruz on Sunday March 31, 2024 @02:20PM (#39886629)
For a few recruitments, we asked the candidates to create a front app like this with React. It was quite nice as we could quickly see how they use the library, what they know etc.

Simple app but funny game.

Re:Guess My RGB by mldbk on Sunday March 31, 2024 @03:49PM (#39887449)
Randomly got from first attempt
Re:Guess My RGB by teensydata on Sunday March 31, 2024 @04:13PM (#39887629)
It's funny that I made a website exactly like this a few months ago. It was supposed to be Wordle for colors
Re:Guess My RGB by pteraspidomorph on Sunday March 31, 2024 @04:17PM (#39887676)
I got the first one in a single guess and now I'm afraid it can only go downhill from here...
Re:Guess My RGB by yoyopa on Sunday March 31, 2024 @05:09PM (#39888084)
isn't this HEX? RGB is usually 0-255 or 0 to 1
Re:Guess My RGB by stanleykm on Sunday March 31, 2024 @08:43PM (#39889694)
it is rgb just 4 bits per channel instead of 8
Re:Guess My RGB by imacomputer on Sunday March 31, 2024 @05:26PM (#39888205)
Nice! I would love to study how people hone in the correct color, and how close people get on the first try.

Do people binary search or scan a range?, how do they prioritize the color channels? etc

Re:Guess My RGB by taylorius on Sunday March 31, 2024 @05:35PM (#39888256)
I seem to be able to get it in around 7-8 guesses usually - based on a fairly good initial guess (85% or so) and the heuristic that if the percentage went up by 1 in the previous axis increment / decrement, that axis is now at the correct value. It's a really entertaining game. Kudos to the author!
Re:Guess My RGB by hunter2_ on Sunday March 31, 2024 @10:43PM (#39890407)
Reminds me of notching out microphone feedback on a 31-band graphic equalizer without a real-time analyzer revealing the frequency. There was ear training software to simulate this activity, for practicing the art.
Re:Guess My RGB by indigoabstract on Monday April 01, 2024 @08:21AM (#39893354)
It would be interesting to know what type of people would find this game amusing..

Since I'm one of them, perhaps programmers?

Re:Guess My RGB by xzel on Monday April 01, 2024 @06:42PM (#39900256)
This is awesome! I would love a GeoGuessr style gameplay element and watch my design friends compete over a couple of beers!