Hi @andresaliba
The result and why it’s so hard for you to get there has multiple causes. Same as with a plane crash
There are often multiple and an addition of causes. 
First, as explained by @Blake, you are using wrong color values passed for color3 without conversion.
You can make use of ‘tools’ to convert your color (from or to RGB or HEX values). Very simply, on RGB, you can apply the max level for each channel (255) to return a value within the range of BJS values for color3 or color4.
I.E., where
should read:
var leatherRed = new BABYLON.Color3(110/255, 3/255, 0)
Second, you are converting your colors to the GammaSpace which in essence, does a bit of the same as in photoshop (since it seems you are a psd user) when you use a colorspace/colorprofile. It handles only the gamma but it constrains the spectrum within your colorprofile (in this case for gamma only). Though, as explained by @Blake, the gamma space is not intended for PBR (since PBR is based on physical rendering).
Third, you chose to go with PBR. A fine choice. You can get awesome results with PBR. However PBR is quite different from how you’d use a standardMaterial. The ‘environment’ and ‘the light’ will highly influence the final result. Not to mention all the other parameters, such as reflection, refraction…PBR as its name suggest is based on physical rendering. This means you cannot really temper all too much with the values you put in there or you’ll get unexpected results each time you add a light or more light or another environment.
I hope this (and the above answers from both @labris and @blake will help you. Also do not hesitate to tour the doc for the section ‘mastering PBR mat’. It’s a bit tedious to learn if you never done PBR before, but it’s quite comprehensive and with the help of the PGs and example, you’ll soon become a PBR master
Else, feel free to return here with your PG and questions and we’ll guide you through it the best we can. Meanwhile, have a great day, 
Edit: Forgot to mention, once you know a bit more about the handling of colors in BJS (or even before that) BEWARE of the values you can retrieve in ‘the inspector’. I’m saying this because you mentionned a color picker.
For the one in the BJS ‘inspector’ and as per the tiny-mini little bit of text below the colorpicker (I would call it 'a disclaimer
, the values given here are CONVERTED TO THE GAMMA SPACE (even for PBR). The only go-around to make sure the values that are in there are ‘forced’ to the linear space is by using the tool ‘.toLinearSpace()’ on your color (either RGB or HEX color). Then, and only then, the values displayed in the colorpicker of the inspector are in truth, the true ‘linear’ values. I’ve been thinking for a while making a post about this but know that the handling of the colorspace is in fact new to version 5 BJS. And knowing a bit about how difficult this is, I didn’t want to put additional pressure on the people who did undertake this huge part of work.