Test rgba() color parsing results On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS parse('rgba(0.9.9%, 0%, 0%, 1)') is 'RGBA[102, 102, 102, 255]' PASS parse('rgba(0, 0.., 0, 1)') is 'RGBA[102, 102, 102, 255]' PASS parse('rgba(10%, .%, 0%, 1)') is 'RGBA[102, 102, 102, 255]' PASS parse('rgba(13.37%1337%, 5%, 50.0%, 1)') is 'RGBA[102, 102, 102, 255]' PASS parse('rgba(%, 50%, 50.0%, 1)') is 'RGBA[102, 102, 102, 255]' PASS parse('rgba(50.0%, 50%, a%, 1)') is 'RGBA[102, 102, 102, 255]' PASS parse('rgba(500%, 0%, 0%, 1)') is 'RGBA[255, 0, 0, 255]' PASS parse('rgba(100%, 100%, 100%, 1)') is 'RGBA[255, 255, 255, 255]' FAIL parse('rgba(10.5%, 80%, 70%, 1)') should be RGBA[27, 204, 179, 255]. Was RGBA[26, 204, 178, 255]. PASS parse('rgba(0%, 0%, 0%, 1)') is 'RGBA[0, 0, 0, 255]' FAIL parse('rgba(50.0%, 50.0%, 50.0%, 1)') should be RGBA[128, 128, 128, 255]. Was RGBA[127, 127, 127, 255]. PASS parse('rgba(100%, 100%, 100%, 1)') is 'RGBA[255, 255, 255, 255]' FAIL parse('rgba(10.5%, 80%, 70%, 1)') should be RGBA[27, 204, 179, 255]. Was RGBA[26, 204, 178, 255]. FAIL parse('rgba(55.5%, 0.5%, 110%, 1)') should be RGBA[142, 1, 255, 255]. Was RGBA[141, 1, 255, 255]. FAIL parse('rgba(60.59998%, 0.59999%, 110.12345%, 1)') should be RGBA[155, 2, 255, 255]. Was RGBA[154, 1, 255, 255]. FAIL parse('rgba(10.999%, 0.999%, 0.000009%, 1)') should be RGBA[28, 3, 0, 255]. Was RGBA[28, 2, 0, 255]. FAIL parse('rgba(79.99999%, 99.99999%, 500%, 1)') should be RGBA[204, 255, 255, 255]. Was RGBA[203, 254, 255, 255]. PASS parse('rgba(0, 0, 0, -0.10)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, -5.0)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, 5.0)') is 'RGBA[0, 0, 0, 255]' PASS parse('rgba(0, 0, 0, -1)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, 0)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, 2)') is 'RGBA[0, 0, 0, 255]' PASS parse('rgba(0, 0, 0, 2.0)') is 'RGBA[0, 0, 0, 255]' PASS parse('rgba(0, 0, 0, 0.0)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, 00.0)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, 0.00)') is 'RGBA[0, 0, 0, 0]' PASS parse('rgba(0, 0, 0, .1)') is 'RGBA[0, 0, 0, 26]' PASS parse('rgba(0, 0, 0, .2)') is 'RGBA[0, 0, 0, 51]' PASS parse('rgba(0, 0, 0, .3)') is 'RGBA[0, 0, 0, 77]' PASS parse('rgba(0, 0, 0, .4)') is 'RGBA[0, 0, 0, 102]' PASS parse('rgba(0, 0, 0, .5)') is 'RGBA[0, 0, 0, 128]' PASS parse('rgba(0, 0, 0, .6)') is 'RGBA[0, 0, 0, 153]' PASS parse('rgba(0, 0, 0, .7)') is 'RGBA[0, 0, 0, 179]' PASS parse('rgba(0, 0, 0, .8)') is 'RGBA[0, 0, 0, 204]' PASS parse('rgba(0, 0, 0, .9)') is 'RGBA[0, 0, 0, 230]' PASS parse('rgba(0, 0, 0, 0.1)') is 'RGBA[0, 0, 0, 26]' PASS parse('rgba(0, 0, 0, 0.2)') is 'RGBA[0, 0, 0, 51]' PASS parse('rgba(0, 0, 0, 0.3)') is 'RGBA[0, 0, 0, 77]' PASS parse('rgba(0, 0, 0, 0.4)') is 'RGBA[0, 0, 0, 102]' PASS parse('rgba(0, 0, 0, 0.5)') is 'RGBA[0, 0, 0, 128]' PASS parse('rgba(0, 0, 0, 0.6)') is 'RGBA[0, 0, 0, 153]' PASS parse('rgba(0, 0, 0, 0.7)') is 'RGBA[0, 0, 0, 179]' PASS parse('rgba(0, 0, 0, 0.8)') is 'RGBA[0, 0, 0, 204]' PASS parse('rgba(0, 0, 0, 0.9)') is 'RGBA[0, 0, 0, 230]' PASS parse('rgba(0, 0, 0, 1.0)') is 'RGBA[0, 0, 0, 255]' PASS parse('rgba(0, 0, 0, 0.10)') is 'RGBA[0, 0, 0, 26]' PASS parse('rgba(0, 0, 0, 0.20)') is 'RGBA[0, 0, 0, 51]' PASS parse('rgba(0, 0, 0, 0.30)') is 'RGBA[0, 0, 0, 77]' PASS parse('rgba(0, 0, 0, 0.40)') is 'RGBA[0, 0, 0, 102]' PASS parse('rgba(0, 0, 0, 0.50)') is 'RGBA[0, 0, 0, 128]' PASS parse('rgba(0, 0, 0, 0.60)') is 'RGBA[0, 0, 0, 153]' PASS parse('rgba(0, 0, 0, 0.70)') is 'RGBA[0, 0, 0, 179]' PASS parse('rgba(0, 0, 0, 0.80)') is 'RGBA[0, 0, 0, 204]' PASS parse('rgba(0, 0, 0, 0.90)') is 'RGBA[0, 0, 0, 230]' PASS parse('rgba(0, 0, 0, 1.00)') is 'RGBA[0, 0, 0, 255]' PASS parse('rgba(0, 0, 0, .10)') is 'RGBA[0, 0, 0, 26]' PASS parse('rgba(0, 0, 0, .20)') is 'RGBA[0, 0, 0, 51]' PASS parse('rgba(0, 0, 0, .30)') is 'RGBA[0, 0, 0, 77]' PASS parse('rgba(0, 0, 0, .40)') is 'RGBA[0, 0, 0, 102]' PASS parse('rgba(0, 0, 0, .50)') is 'RGBA[0, 0, 0, 128]' PASS parse('rgba(0, 0, 0, .60)') is 'RGBA[0, 0, 0, 153]' PASS parse('rgba(0, 0, 0, .70)') is 'RGBA[0, 0, 0, 179]' PASS parse('rgba(0, 0, 0, .80)') is 'RGBA[0, 0, 0, 204]' PASS parse('rgba(0, 0, 0, .90)') is 'RGBA[0, 0, 0, 230]' PASS parse('rgba(0, 0, 0, 0.10000000000000000000000)') is 'RGBA[0, 0, 0, 26]' PASS parse('rgba(0, 0, 0, 0.20000000000000000000000)') is 'RGBA[0, 0, 0, 51]' PASS parse('rgba(0, 0, 0, 0.30000000000000000000000)') is 'RGBA[0, 0, 0, 77]' PASS parse('rgba(0, 0, 0, 0.40000000000000000000000)') is 'RGBA[0, 0, 0, 102]' PASS parse('rgba(0, 0, 0, 0.50000000000000000000000)') is 'RGBA[0, 0, 0, 128]' PASS parse('rgba(0, 0, 0, 0.60000000000000000000000)') is 'RGBA[0, 0, 0, 153]' PASS parse('rgba(0, 0, 0, 0.70000000000000000000000)') is 'RGBA[0, 0, 0, 179]' PASS parse('rgba(0, 0, 0, 0.80000000000000000000000)') is 'RGBA[0, 0, 0, 204]' PASS parse('rgba(0, 0, 0, 0.90000000000000000000000)') is 'RGBA[0, 0, 0, 230]' PASS parse('rgba(0, 0, 0, 1.00000000000000000000000)') is 'RGBA[0, 0, 0, 255]' PASS parse('rgba(0, 0, 0, 0.990)') is 'RGBA[0, 0, 0, 252]' PASS parse('rgba(0, 0, 0, 0.991)') is 'RGBA[0, 0, 0, 253]' PASS parse('rgba(0, 0, 0, 0.992)') is 'RGBA[0, 0, 0, 253]' PASS parse('rgba(0, 0, 0, 0.993)') is 'RGBA[0, 0, 0, 253]' PASS parse('rgba(0, 0, 0, 0.994)') is 'RGBA[0, 0, 0, 253]' PASS parse('rgba(0, 0, 0, 0.995)') is 'RGBA[0, 0, 0, 254]' PASS parse('rgba(0, 0, 0, 0.996)') is 'RGBA[0, 0, 0, 254]' PASS parse('rgba(0, 0, 0, 0.997)') is 'RGBA[0, 0, 0, 254]' PASS parse('rgba(0, 0, 0, 0.998)') is 'RGBA[0, 0, 0, 254]' PASS parse('rgba(0, 0, 0, 0.999)') is 'RGBA[0, 0, 0, 255]' PASS successfullyParsed is true TEST COMPLETE