Inspired by manu.ninja approach there's a front-end (or nodejs if using node-canvas) equivalent without using GraphicsMagick:
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d');
const image = new Image();
image.onload = () => {
canvas.width = image.width;
canvas.height = image.height;
context.drawImage(image, 0, 0, 1, 1);
alert(`color is rgba(${context.getImageData(0, 0, 1, 1).data.join(',')})`);
};
image.src = 'pic.jpg';
Do take into consideration all CORS rules apply.