| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta charset="utf-8"> |
| <title>CSS Color Level 4: Parsing and serialization of colors using valid RGB notation</title> |
| <link rel="help" href="https://drafts.csswg.org/css-color-4/#rgb-functions"> |
| <link rel="help" href="https://drafts.csswg.org/css-color-4/#resolving-sRGB-values"> |
| <link rel="help" href="https://drafts.csswg.org/css-color-4/#serializing-sRGB-values"> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <script src="/css/support/parsing-testcommon.js"></script> |
| </head> |
| <body> |
| <script> |
| test_valid_value("color", "rgb(none none none)", "rgb(0, 0, 0)"); |
| test_valid_value("color", "rgb(none none none / none)", "rgba(0, 0, 0, 0)"); |
| test_valid_value("color", "rgb(128 none none)", "rgb(128, 0, 0)"); |
| test_valid_value("color", "rgb(128 none none / none)", "rgba(128, 0, 0, 0)"); |
| test_valid_value("color", "rgb(none none none / .5)", "rgba(0, 0, 0, 0.5)"); |
| test_valid_value("color", "rgb(20% none none)", "rgb(51, 0, 0)"); |
| test_valid_value("color", "rgb(20% none none / none)", "rgba(51, 0, 0, 0)"); |
| test_valid_value("color", "rgb(none none none / 50%)", "rgba(0, 0, 0, 0.5)"); |
| test_valid_value("color", "rgba(none none none)", "rgb(0, 0, 0)"); |
| test_valid_value("color", "rgba(none none none / none)", "rgba(0, 0, 0, 0)"); |
| test_valid_value("color", "rgba(128 none none)", "rgb(128, 0, 0)"); |
| test_valid_value("color", "rgba(128 none none / none)", "rgba(128, 0, 0, 0)"); |
| test_valid_value("color", "rgba(none none none / .5)", "rgba(0, 0, 0, 0.5)"); |
| test_valid_value("color", "rgba(20% none none)", "rgb(51, 0, 0)"); |
| test_valid_value("color", "rgba(20% none none / none)", "rgba(51, 0, 0, 0)"); |
| test_valid_value("color", "rgba(none none none / 50%)", "rgba(0, 0, 0, 0.5)"); |
| </script> |
| </body> |
| </html> |