 	hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
 	}
 
+isNumeric = (value) ->
+	return !isNaN(value) && isFinite(value)
+
 stringToObject = (color) ->
 	trimLeft = /^[\s,#]+/
 	trimRight = /\s+$/

# Conversion Functions
# RGB to RGB
rgbToRgb = (r, g, b) ->
	r: if _.isNumber(r) then bound01(r, 255) * 255 else 0
	g: if _.isNumber(g) then bound01(g, 255) * 255 else 0
	b: if _.isNumber(b) then bound01(b, 255) * 255 else 0

# RGB to HEX
rgbToHex = (r, g, b, allow3Char) ->


			else if color.hasOwnProperty("h") or color.hasOwnProperty("s")

				h = if isNumeric(color.h) then color.h else 0
				s = if isNumeric(color.s) then convertToPercentage(color.s) else 1

				if color.hasOwnProperty("v")
					v = if isNumeric(color.v) then convertToPercentage(color.v) else 0
					rgb = hsvToRgb(h, s, v)
				else
					l = if isNumeric(color.l) then convertToPercentage(color.l) else 50
					rgb = hslToRgb(h, s, l)

				ok = true
