gradient-powerless-hue-oklch.html (1943B)
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <title>Gradient powerless hue component converting tests - hwb</title> 6 <link rel="author" title="CGQAQ" href="mailto:m.jason.liu@gmail.com"> 7 <link rel="help" href="https://www.w3.org/TR/css-color-4/#interpolation"> 8 <meta name="assert" content="Tests that powerless hue component logic works."> 9 <link rel="match" href="gradient-powerless-hue-oklch-ref.html"> 10 <meta name=fuzzy content="maxDifference=1;totalPixels=0-500"> 11 <style> 12 .test { 13 display: flex; 14 align-items: center; 15 width: 200px; 16 height: 50px; 17 position: relative; 18 border: 1px solid black; 19 margin: 10px; 20 } 21 22 .info { 23 position: absolute; 24 right: -10px; 25 transform: translateX(100%); 26 } 27 28 .oklch { 29 /* Expected */ 30 background-image: linear-gradient(to right in oklch, red, oklch(86.64396175234369% 0.295 142.4953450414439 / 0) ); 31 } 32 .hwb { 33 background-image: linear-gradient(to right in oklch, red, hwb(120deg 0% 0% / 0%) ); 34 } 35 .rgba { 36 background-image: linear-gradient(to right in oklch, red, rgba(0, 255, 0, 0) ); 37 } 38 .hsl { 39 background-image: linear-gradient(to right in oklch, red, hsl(120deg 100% 50% / 0%) ); 40 } 41 .color { 42 background-image: linear-gradient(90deg in oklch, red, color(srgb 0 1 0 / 0) ); 43 } 44 </style> 45 </head> 46 <p>They should be the same as the first box.</p> 47 <ol> 48 <li class="test oklch"><div class="info">oklch() Expected</div></li> 49 <li class="test hwb"><div class="info">hwb()</div></li> 50 <li class="test rgba"><div class="info">rgba()</div></li> 51 <li class="test hsl"><div class="info">hsl()</div></li> 52 <li class="test color"><div class="info">color()</div></li> 53 </ol> 54 </html>