def color_to_pixel(color):
	"""Turns RGB color value to pixel value."""
	red = color[0]
	green = color[1]
	blue = color[2]
	alpha = 0
	if len(color) == 4:
		alpha = color[3]
	return ((((red)) << 24) |    # noqa: W504
			(((green)) << 16) |  # noqa: W504
			(((blue)) << 8) |    # noqa: W504
			((alpha)))           # noqa: W504