get_rgba_from_color_implementation = (color) => {
	const single_pixel_canvas = make_canvas(1, 1);

	single_pixel_canvas.ctx.fillStyle = color;
	single_pixel_canvas.ctx.fillRect(0, 0, 1, 1);

	const image_data = single_pixel_canvas.ctx.getImageData(0, 0, 1, 1);

	// We could just return image_data.data, but let's return an Array instead
	// I'm not totally sure image_data.data wouldn't keep the ImageData object around in memory
	return /** @type {[number, number, number, number]} */ (Array.from(image_data.data));
	// Equivalently:
	// return [image_data.data[0], image_data.data[1], image_data.data[2], image_data.data[3]];
}
@param {string | CanvasPattern | CanvasGradient} color  CSS color value (or pattern/gradient, which will be sampled from a 1x1 canvas)
@returns {[number, number, number, number]}  [r, g, b, a] values ranging from 0 to 255
@example
const [r, g, b, a] = get_rgba_from_color("rgba(255, 0, 0, 0.5)");
console.log(r, g, b, a); // 255, 0, 0, 128