Page 1 of 2

Didactic RGB

Posted: Mon Jun 22, 2009 7:20 pm
by Pai Mei
first i downloaded the graphic (the pixel) and opened it with paint. then i checked the rgb-value, calculated and got a wrong result.
then i copied the graphic and pasted it into paint. then i checked the rgb-value and it was slightly different (two of the three color values were decreased by 1). this second value led me to the right answer.

how come there is this difference?

Posted: Tue Aug 18, 2009 1:40 am
by SinistraD
I haven't had such a problem, but how do you get the rgb value of a pixel in Paint? I used GIMP, but Paint is always easier to attain for trivial tasks (like this).

Posted: Tue Aug 18, 2009 9:28 am
by sabretooth
SinistraD wrote:I haven't had such a problem, but how do you get the rgb value of a pixel in Paint? I used GIMP, but Paint is always easier to attain for trivial tasks (like this).
use the eyedropper tool to select you colour then do to the 'colors' menu 'edit colors' click the 'define custom colors' button. Voila. RGB in decimal :)

hope that helps.

sabre

Posted: Tue Aug 18, 2009 11:35 am
by SinistraD
Thanks for the reply, never tried this way so far. I went that far to get the color with the "eyedropper", than I tried to obtain the RGB in the color toolbox.

Posted: Thu Apr 15, 2010 5:52 am
by TechnoDemon
i used pixlr for this challenge cause i've used to use photoshop but my license for it have been missing (i have formatted my hdd n when i try to reinstal the photoshop, the dvd-case is missing)*. Pixlr is similar to photoshop but one different: FREE TO USE!!!

*i really dislike using a cracked software. I hate it!

Posted: Mon Oct 18, 2010 4:52 pm
by zahnstein
Had the same problem, paintbrush gave wrong values.
Tip: Use GIMP

Posted: Thu Nov 11, 2010 8:42 am
by Silly Freak
I used gimp under linux (rightclick/copy graphics, paste in gimp) but got the wrong value 10376136. then I checked on a friend's computer under windows, and the value was slightly off... how that?

Posted: Thu Nov 11, 2010 4:27 pm
by MyNameIsAlreadyTaken
I'm using Linux (Ubuntu 10.10 64Bit) and Gimp too, I had no problem in getting the right value.


Maybe copying the Image was a bad idea, try again with rightclick -> save as

Posted: Thu Nov 11, 2010 7:07 pm
by rmplpmpl
You encounter this problem, if the browser renders the picture, actually I do not understand why they do so, but you often see strange colors when comparing a picture in browser view compared to the "raw" pic

Posted: Thu Nov 11, 2010 11:51 pm
by megabreit
It's probably because monitor color profiles and gamma correction change the output to be more "natural"... but this also means it's not "accurate" anymore.
BTW: This is OS independent :-)

Posted: Fri Nov 12, 2010 5:46 am
by rmplpmpl
megabreit wrote:It's probably because monitor color profiles and gamma correction change the output to be more "natural"... but this also means it's not "accurate" anymore.
BTW: This is OS independent :-)
Maybe, though it is strange: take wikipedia f.i. look at any picture, then click on it until you get only the picture displayed in the browser (not embedded in HTML) and you will get different colors, so I guess it has something to do with the browser. Monitor profiles would affect this as well, wouldn't they?

Posted: Sat Nov 13, 2010 12:53 am
by megabreit
rmplpmpl wrote: Maybe, though it is strange: take wikipedia f.i. look at any picture, then click on it until you get only the picture displayed in the browser (not embedded in HTML) and you will get different colors, so I guess it has something to do with the browser. Monitor profiles would affect this as well, wouldn't they?
To be honest, I don't really know if it works like that. It's also possible, that the application may decide to honor color profiles or simply work with raw values. E.g. in Firefox there is a config option gfx.color_management.mode (see in about:config). Does the behavior change if you choose different values?

Posted: Thu Jan 05, 2012 12:30 am
by wynk
My tiny ruby solution:

Code: Select all

require 'rubygems'
require 'chunky_png'
image = ChunkyPNG::Image.from_file('didactrgb.png')
color = ChunkyPNG::Color.to_truecolor_bytes(image[0,0])
color.map! { |x| x.to_s(2).rjust(8, '0') }
puts color.join.to_i(2)

Posted: Wed May 02, 2012 8:30 pm
by DragonEgghead
Step 1: Get the RGB value from MSPaint (as described by others).
Step 2: Plug in values to my script from before:

Code: Select all

int(''.join("%08d"%int(bin(i)[2:]) for i in [156, 84, 198]),2)

Posted: Sun Feb 24, 2013 1:01 pm
by AgRaven
I found some research on png files helped explain why the colours were distorted. My solution was definitely roundabout, could have done it much simpler, but still, explains thecolour issues.