t422-rgba-func-pct-a

rgba() colors

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Assertion
Test that rgba() values produce correct colors.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3 	<head>
 4 		<title>CSS Test: rgba() colors</title>
 5 		<link rel="author" title="L. David Baron" href="https://dbaron.org/">
 6 		<link rel="author" title="Mozilla Corporation" href="http://mozilla.com/">
 7 		<link rel="help" href="http://www.w3.org/TR/css3-color/#rgba-color">
 8 		<link rel="match" href="reference/t422-rgba-func-int-a-ref.htm">
 9 		<meta name="flags" content="">
10 		<meta name="assert" content="Test that rgba() values produce correct colors.">
11 		<style type="text/css">
12 		#one { color: rgba(0%, 0%, 0%, 1.0); background: rgba(100%, 100%, 100%, 1.0); }
13 		#two { color: rgba(100%, 100%, 100%, 1.0); background: rgba(0%, 0%, 0%, 1.0); }
14 		#three { color: rgba(100%, 0%, 0%, 1.0); }
15 		#four { color: rgba(0%, 100%, 0%, 1.0); }
16 		#five { color: rgba(0%, 0%, 100%, 1.0); }
17 		</style>
18 	</head>
19 	<body>
20 		<p id="one">This should be black text on a white background.</p>
21 		<p id="two">This should be white text on a black background.</p>
22 		<p id="three">This text should be red.</p>
23 		<p id="four">This text should be green.</p>
24 		<p id="five">This text should be blue.</p>
25 	</body>
26 </html>