 # Conversion Functions
 # RGB to RGB
 rgbToRgb = (r, g, b) ->
-	r: bound01(r, 255) * 255
-	g: bound01(g, 255) * 255
-	b: bound01(b, 255) * 255
+	r: if isNumeric(r) then bound01(r, 255) * 255 else 0
+	g: if isNumeric(g) then bound01(g, 255) * 255 else 0
+	b: if isNumeric(b) then bound01(b, 255) * 255 else 0
 
 # RGB to HEX
 rgbToHex = (r, g, b, allow3Char) ->

	hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
	}

stringToObject = (color) ->
	trimLeft = /^[\s,#]+/
	trimRight = /\s+$/

		result = null

		if fromColor not instanceof Color and toColor instanceof Color
			fromColor = toColor.copy()
			fromColor.a = 0
		else if fromColor instanceof Color and fromColor._a == 0 and toColor instanceof Color and toColor._a != 0
			fromColor = toColor.copy()
			fromColor.a = 0
		else if toColor not instanceof Color and fromColor instanceof Color
			toColor = fromColor.copy()
			toColor.a = 0
		else if toColor instanceof Color and toColor._a == 0 and fromColor instanceof Color and fromColor._a != 0
			toColor = fromColor.copy()
			toColor.a = 0

		if toColor instanceof Color

