You need to read that colorbar part of the image and then divide by 255.
colorsInBar = rgbImage(row1:row2, col1:col2, :);
[r, g, b] = imsplit(colorsInBar);
cMap = double([r(:), g(:), b(:)]) / 255;
You may be interested to see how I did it for thermal images:
To get the numbers you can use ocr in the Computer Vision Toolbox, but the numbers must be at least 20 pixels high.