RGB to rgb

nikl

New Member
Hey everybody!

I am new to this board and hopefully somebody here can help me, I am kind of clueless at the moment.
Today I stumbled across what allegedly is called rgb (lowercase) code and I have no idea how to find out what colors have which rgb code. I did find a chart that lists some basic colors in Hex, RGB and rgb code, but I couldnt find a connection between them, the main problem is that rgb values can for some reason have different RGB values. I need to find the rgb code for both #d1c2d9 and #80678d

And this is what rgb code looks like in case you are wondering:

rgb(0.00, 0.00, 0.00) = #000000 (black)
rgb(1.00, 1.00, 1.00) = #FFFFFF (white)

Does anybody know how to get rgb code from either RGB or Hex code? Thank you in advance!
 

leroy30

New Member
I don't know where you are getting rgb(1.00,1.00,1.00) = white from... what program is using that? It's an odity to me!

rgb should be thought of as red, green and blue. Each red green or blue can have a value between 0 and 255 which represents how much of that colour to mix. For example r = 0, g = 0, b = 0 (in your example rgb(0,0,0)) is black. r = 255, g = 255, b = 255 is white etc etc.

To convert the values either use a program that shows you the different versions (photoshop tells you RGB, CYMK, Hex & more) or use an online tool such as http://www.javascripter.net/faq/rgbtohex.htm

To do it manually, or simply understand how it works:

Hexidecimal has a 16-base numbering system instead of the 1-10 (10-base) system you are used to counting in. That is why there are numbers and letters. 0123456789ABCDEF is the same as 0 to 15 (16 numbers including zero). 16 * 16 is 256 which is the number of colour you can mix in each red, green and blue slot (including zero). This is why Hex has 6 values after the hash(#). First two values multiplied = Red, second set of values multiplied = Green and third set of values multipled = blue.

As an example if I take green represented as rgb(0,255,0) to work out the hex I need to find two numbers less than 16 that multiply to give me each one.

0 x 0 = 0 so #00
16 x 16 = F x F so #00FF
0 x 0 = 0 so #00FF00 and that is the hexidecimal value.

Simple once you know it but it's just way easier to use a tool!

Hope that made sense,
Le-roy.
 

nikl

New Member
I already figured it out yesterday. Simply take your RGB values and divide each number with 255. Thats why one rgb value can have different RGB values (since we're going to round the rgb number up or down)

I dont know where this rgb code is used except in the Zend Framework and I have never seen it anywhere else. Here is the chart that shows some colors and also proves that the method RGB number : 255 = rgb numer is correct - so in the end it is just a different way of displaying RGB values with much smaller numbers.. whatever the benefit of that may be

colorchart_RGB_Hex_rgb.jpg


BTW, now I finally know how Hex values are created ;) - Thanks!
 
Last edited:
Top