| Tests for the WI.Color model object. |
| |
| |
| == Running test suite: WI.Color |
| -- Running test case: WI.Color.fromString |
| "#000" resolves to "#000" |
| "#a0A" resolves to "#a0a" |
| "#000000" resolves to "#000000" |
| "#a0Aa0A" resolves to "#a0aa0a" |
| "#0000" resolves to "#0000" |
| "#a0Af" resolves to "#a0af" |
| "#00000000" resolves to "#00000000" |
| "#a0Aa0Aff" resolves to "#a0aa0aff" |
| "rgb(10,20,30)" resolves to "rgb(10, 20, 30)" |
| "RGB(10,20,30)" resolves to "rgb(10, 20, 30)" |
| "rgb( 10 , 20 , 30 )" resolves to "rgb(10, 20, 30)" |
| "rgb(999, 999, 999)" resolves to "rgb(255, 255, 255)" |
| "rgb(10 20 30)" resolves to "rgb(10, 20, 30)" |
| "RGB(10 20 30)" resolves to "rgb(10, 20, 30)" |
| "rgb( 10 20 30 )" resolves to "rgb(10, 20, 30)" |
| "rgb(999 999 999)" resolves to "rgb(255, 255, 255)" |
| "rgb(10,20,30,40)" resolves to "rgba(10, 20, 30, 1)" |
| "RGB(10,20,30,40)" resolves to "rgba(10, 20, 30, 1)" |
| "rgb( 10 , 20 , 30 , 40 )" resolves to "rgba(10, 20, 30, 1)" |
| "rgb(999, 999, 999, 999)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10,20,30,40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "RGB(10,20,30,40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgb( 10 , 20 , 30 , 40% )" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgb(999, 999, 999, 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10 20 30 / 40)" resolves to "rgba(10, 20, 30, 1)" |
| "RGB(10 20 30 / 40)" resolves to "rgba(10, 20, 30, 1)" |
| "rgb( 10 20 30 / 40 )" resolves to "rgba(10, 20, 30, 1)" |
| "rgb(999 999 999 / 999)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10 20 30 / 40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "RGB(10 20 30 / 40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgb( 10 20 30 / 40% )" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgb(999 999 999 / 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10,20,30,40)" resolves to "rgba(10, 20, 30, 1)" |
| "RGBA(10,20,30,40)" resolves to "rgba(10, 20, 30, 1)" |
| "rgba( 10 , 20 , 30 , 40 )" resolves to "rgba(10, 20, 30, 1)" |
| "rgba(999, 999, 999, 999)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10,20,30,40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "RGBA(10,20,30,40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgba( 10 , 20 , 30 , 40% )" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgba(999, 999, 999, 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10 20 30 / 40)" resolves to "rgba(10, 20, 30, 1)" |
| "RGBA(10 20 30 / 40)" resolves to "rgba(10, 20, 30, 1)" |
| "rgba( 10 20 30 / 40 )" resolves to "rgba(10, 20, 30, 1)" |
| "rgba(999 999 999 / 999)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10 20 30 / 40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "RGBA(10 20 30 / 40%)" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgba( 10 20 30 / 40% )" resolves to "rgba(10, 20, 30, 0.4)" |
| "rgba(999 999 999 / 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10%,20%,30%)" resolves to "rgb(26, 51, 77)" |
| "RGB(10%,20%,30%)" resolves to "rgb(26, 51, 77)" |
| "rgb( 10% , 20% , 30% )" resolves to "rgb(26, 51, 77)" |
| "rgb(999%, 999%, 999%)" resolves to "rgb(255, 255, 255)" |
| "rgb(10% 20% 30%)" resolves to "rgb(26, 51, 77)" |
| "RGB(10% 20% 30%)" resolves to "rgb(26, 51, 77)" |
| "rgb( 10% 20% 30% )" resolves to "rgb(26, 51, 77)" |
| "rgb(999% 999% 999%)" resolves to "rgb(255, 255, 255)" |
| "rgb(10%,20%,30%,40)" resolves to "rgba(26, 51, 77, 1)" |
| "RGB(10%,20%,30%,40)" resolves to "rgba(26, 51, 77, 1)" |
| "rgb( 10% , 20% , 30% , 40 )" resolves to "rgba(26, 51, 77, 1)" |
| "rgb(999%, 999%, 999%, 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10%,20%,30%,40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "RGB(10%,20%,30%,40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgb( 10% , 20% , 30% , 40% )" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgb(999%, 999%, 999%, 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10% 20% 30% / 40)" resolves to "rgba(26, 51, 77, 1)" |
| "RGB(10% 20% 30% / 40)" resolves to "rgba(26, 51, 77, 1)" |
| "rgb( 10% 20% 30% / 40 )" resolves to "rgba(26, 51, 77, 1)" |
| "rgb(999% 999% 999% / 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgb(10% 20% 30% / 40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "RGB(10% 20% 30% / 40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgb( 10% 20% 30% / 40% )" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgb(999% 999% 999% / 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10%,20%,30%,40)" resolves to "rgba(26, 51, 77, 1)" |
| "RGBA(10%,20%,30%,40)" resolves to "rgba(26, 51, 77, 1)" |
| "rgba( 10% , 20% , 30% , 40 )" resolves to "rgba(26, 51, 77, 1)" |
| "rgba(999%, 999%, 999%, 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10%,20%,30%,40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "RGBA(10%,20%,30%,40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgba( 10% , 20% , 30% , 40% )" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgba(999%, 999%, 999%, 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10% 20% 30% / 40)" resolves to "rgba(26, 51, 77, 1)" |
| "RGBA(10% 20% 30% / 40)" resolves to "rgba(26, 51, 77, 1)" |
| "rgba( 10% 20% 30% / 40 )" resolves to "rgba(26, 51, 77, 1)" |
| "rgba(999% 999% 999% / 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "rgba(10% 20% 30% / 40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "RGBA(10% 20% 30% / 40%)" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgba( 10% 20% 30% / 40% )" resolves to "rgba(26, 51, 77, 0.4)" |
| "rgba(999% 999% 999% / 999%)" resolves to "rgba(255, 255, 255, 1)" |
| "hsl(10,20%,30%)" resolves to "hsl(10, 20%, 30%)" |
| "HSL(10,20%,30%)" resolves to "hsl(10, 20%, 30%)" |
| "hsl( 10 , 20% , 30% )" resolves to "hsl(10, 20%, 30%)" |
| "hsl(999, 999%, 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10 20% 30%)" resolves to "hsl(10, 20%, 30%)" |
| "HSL(10 20% 30%)" resolves to "hsl(10, 20%, 30%)" |
| "hsl( 10 20% 30% )" resolves to "hsl(10, 20%, 30%)" |
| "hsl(999 999% 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSL(10,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl( 10 , 20% , 30% , 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl(999, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSL(10,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl( 10 , 20% , 30% , 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl(999, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSL(10 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl( 10 20% 30% / 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl(999 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSL(10 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl( 10 20% 30% / 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl(999 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSL(10,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl( 10 , 20% , 30% , 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl(999, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSL(10,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl( 10 , 20% , 30% , 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl(999, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSLA(10,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsla( 10 , 0% , 50% , 40 )" resolves to "hsla(10, 0%, 50%, 1)" |
| "hsla(999, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSLA(10,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla( 10 , 20% , 30% , 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla(999, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSLA(10 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsla( 10 20% 30% / 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsla(999 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSLA(10 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla( 10 20% 30% / 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla(999 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10deg,20%,30%)" resolves to "hsl(10, 20%, 30%)" |
| "HSL(10deg,20%,30%)" resolves to "hsl(10, 20%, 30%)" |
| "hsl( 10deg , 20% , 30% )" resolves to "hsl(10, 20%, 30%)" |
| "hsl(999deg, 999%, 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10deg 20% 30%)" resolves to "hsl(10, 20%, 30%)" |
| "HSL(10deg 20% 30%)" resolves to "hsl(10, 20%, 30%)" |
| "hsl( 10deg 20% 30% )" resolves to "hsl(10, 20%, 30%)" |
| "hsl(999deg 999% 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10deg,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSL(10deg,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl( 10deg , 20% , 30% , 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl(999deg, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10deg,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSL(10deg,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl( 10deg , 20% , 30% , 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl(999deg, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10deg 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSL(10deg 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl( 10deg 20% 30% / 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl(999deg 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10deg 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSL(10deg 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl( 10deg 20% 30% / 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl(999deg 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10deg,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSL(10deg,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl( 10deg , 20% , 30% , 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsl(999deg, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10deg,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSL(10deg,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl( 10deg , 20% , 30% , 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsl(999deg, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10deg,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSLA(10deg,20%,30%,40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsla( 10deg , 0% , 50% , 40 )" resolves to "hsla(10, 0%, 50%, 1)" |
| "hsla(999deg, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10deg,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSLA(10deg,20%,30%,40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla( 10deg , 20% , 30% , 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla(999deg, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10deg 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "HSLA(10deg 20% 30% / 40)" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsla( 10deg 20% 30% / 40 )" resolves to "hsla(10, 20%, 30%, 1)" |
| "hsla(999deg 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10deg 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "HSLA(10deg 20% 30% / 40%)" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla( 10deg 20% 30% / 40% )" resolves to "hsla(10, 20%, 30%, 0.4)" |
| "hsla(999deg 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10rad,20%,30%)" resolves to "hsl(360, 20%, 30%)" |
| "HSL(10rad,20%,30%)" resolves to "hsl(360, 20%, 30%)" |
| "hsl( 10rad , 20% , 30% )" resolves to "hsl(360, 20%, 30%)" |
| "hsl(999rad, 999%, 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10rad 20% 30%)" resolves to "hsl(360, 20%, 30%)" |
| "HSL(10rad 20% 30%)" resolves to "hsl(360, 20%, 30%)" |
| "hsl( 10rad 20% 30% )" resolves to "hsl(360, 20%, 30%)" |
| "hsl(999rad 999% 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10rad,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSL(10rad,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl( 10rad , 20% , 30% , 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl(999rad, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10rad,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSL(10rad,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl( 10rad , 20% , 30% , 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl(999rad, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10rad 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSL(10rad 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl( 10rad 20% 30% / 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl(999rad 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10rad 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSL(10rad 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl( 10rad 20% 30% / 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl(999rad 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10rad,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSL(10rad,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl( 10rad , 20% , 30% , 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl(999rad, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10rad,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSL(10rad,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl( 10rad , 20% , 30% , 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl(999rad, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10rad,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSLA(10rad,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsla( 10rad , 0% , 50% , 40 )" resolves to "hsla(360, 0%, 50%, 1)" |
| "hsla(999rad, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10rad,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSLA(10rad,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla( 10rad , 20% , 30% , 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla(999rad, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10rad 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSLA(10rad 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsla( 10rad 20% 30% / 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsla(999rad 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10rad 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSLA(10rad 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla( 10rad 20% 30% / 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla(999rad 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10grad,20%,30%)" resolves to "hsl(9, 20%, 30%)" |
| "HSL(10grad,20%,30%)" resolves to "hsl(9, 20%, 30%)" |
| "hsl( 10grad , 20% , 30% )" resolves to "hsl(9, 20%, 30%)" |
| "hsl(999grad, 999%, 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10grad 20% 30%)" resolves to "hsl(9, 20%, 30%)" |
| "HSL(10grad 20% 30%)" resolves to "hsl(9, 20%, 30%)" |
| "hsl( 10grad 20% 30% )" resolves to "hsl(9, 20%, 30%)" |
| "hsl(999grad 999% 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10grad,20%,30%,40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "HSL(10grad,20%,30%,40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsl( 10grad , 20% , 30% , 40 )" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsl(999grad, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10grad,20%,30%,40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "HSL(10grad,20%,30%,40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsl( 10grad , 20% , 30% , 40% )" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsl(999grad, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10grad 20% 30% / 40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "HSL(10grad 20% 30% / 40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsl( 10grad 20% 30% / 40 )" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsl(999grad 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10grad 20% 30% / 40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "HSL(10grad 20% 30% / 40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsl( 10grad 20% 30% / 40% )" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsl(999grad 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10grad,20%,30%,40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "HSL(10grad,20%,30%,40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsl( 10grad , 20% , 30% , 40 )" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsl(999grad, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10grad,20%,30%,40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "HSL(10grad,20%,30%,40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsl( 10grad , 20% , 30% , 40% )" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsl(999grad, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10grad,20%,30%,40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "HSLA(10grad,20%,30%,40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsla( 10grad , 0% , 50% , 40 )" resolves to "hsla(9, 0%, 50%, 1)" |
| "hsla(999grad, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10grad,20%,30%,40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "HSLA(10grad,20%,30%,40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsla( 10grad , 20% , 30% , 40% )" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsla(999grad, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10grad 20% 30% / 40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "HSLA(10grad 20% 30% / 40)" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsla( 10grad 20% 30% / 40 )" resolves to "hsla(9, 20%, 30%, 1)" |
| "hsla(999grad 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10grad 20% 30% / 40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "HSLA(10grad 20% 30% / 40%)" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsla( 10grad 20% 30% / 40% )" resolves to "hsla(9, 20%, 30%, 0.4)" |
| "hsla(999grad 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10turn,20%,30%)" resolves to "hsl(360, 20%, 30%)" |
| "HSL(10turn,20%,30%)" resolves to "hsl(360, 20%, 30%)" |
| "hsl( 10turn , 20% , 30% )" resolves to "hsl(360, 20%, 30%)" |
| "hsl(999turn, 999%, 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10turn 20% 30%)" resolves to "hsl(360, 20%, 30%)" |
| "HSL(10turn 20% 30%)" resolves to "hsl(360, 20%, 30%)" |
| "hsl( 10turn 20% 30% )" resolves to "hsl(360, 20%, 30%)" |
| "hsl(999turn 999% 999%)" resolves to "hsl(360, 100%, 100%)" |
| "hsl(10turn,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSL(10turn,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl( 10turn , 20% , 30% , 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl(999turn, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10turn,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSL(10turn,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl( 10turn , 20% , 30% , 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl(999turn, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10turn 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSL(10turn 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl( 10turn 20% 30% / 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl(999turn 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10turn 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSL(10turn 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl( 10turn 20% 30% / 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl(999turn 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10turn,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSL(10turn,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl( 10turn , 20% , 30% , 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsl(999turn, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsl(10turn,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSL(10turn,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl( 10turn , 20% , 30% , 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsl(999turn, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10turn,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSLA(10turn,20%,30%,40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsla( 10turn , 0% , 50% , 40 )" resolves to "hsla(360, 0%, 50%, 1)" |
| "hsla(999turn, 999%, 999%, 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10turn,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSLA(10turn,20%,30%,40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla( 10turn , 20% , 30% , 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla(999turn, 999%, 999%, 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10turn 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "HSLA(10turn 20% 30% / 40)" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsla( 10turn 20% 30% / 40 )" resolves to "hsla(360, 20%, 30%, 1)" |
| "hsla(999turn 999% 999% / 999)" resolves to "hsla(360, 100%, 100%, 1)" |
| "hsla(10turn 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "HSLA(10turn 20% 30% / 40%)" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla( 10turn 20% 30% / 40% )" resolves to "hsla(360, 20%, 30%, 0.4)" |
| "hsla(999turn 999% 999% / 999%)" resolves to "hsla(360, 100%, 100%, 1)" |
| |
| PASS: ' #000 ' should not be detected |
| PASS: '#rgb' should not be detected |
| PASS: '#1' should not be detected |
| PASS: '#12' should not be detected |
| PASS: '#12345' should not be detected |
| PASS: '#1234567' should not be detected |
| PASS: '#123456789' should not be detected |
| PASS: 'rgb(255, 255, 255, 0.5, 1)' should not be detected |
| PASS: 'rgba(255, 255, 255, 0.5, 1)' should not be detected |
| PASS: 'hsl(0, 0%, 50%, 1, 2)' should not be detected |
| PASS: 'hsla(0, 0%, 50%, 1, 2)' should not be detected |
| PASS: 'superblue' should not be detected |
| |
| -- Running test case: WI.Color properties |
| PASS: 'red' should have alpha of 1. |
| PASS: 'red' should be simple. |
| PASS: 'red' should be a keyword. |
| PASS: 'red' has rgb of [255, 0, 0]. |
| PASS: 'red' has rgba of [255, 0, 0, 1]. |
| PASS: 'red' has hsl of [0, 100, 50]. |
| PASS: 'red' has hsla of [0, 100, 50, 1]. |
| PASS: 'red' should be serializable as a short Hex |
| PASS: 'transparent' should have alpha of 0. |
| PASS: 'transparent' should not be simple. |
| PASS: 'transparent' should be a keyword. |
| PASS: 'transparent' has rgb of [0, 0, 0]. |
| PASS: 'transparent' has rgba of [0, 0, 0, 0]. |
| PASS: 'transparent' has hsl of [0, 0, 0]. |
| PASS: 'transparent' has hsla of [0, 0, 0, 0]. |
| PASS: 'transparent' should be serializable as a short Hex |
| PASS: '#11122233' should not have alpha of 0. |
| PASS: '#11122233' should be not be simple. |
| PASS: '#11122233' should not be a keyword. |
| PASS: '#11122233' has rgba of [17, 18, 34, 0.2]. |
| PASS: '#11122233' has hsla of [236.47, 33.33, 10, 0.2]. |
| PASS: '#11122233' should not be serializable as a short Hex |
| PASS: '#11223344' should be serializable as a short Hex |
| PASS: '#11223345' should not be serializable as a short Hex |
| |
| -- Running test case: WI.Color from components |
| Check components for color 'rgb(255, 0, 0)'. |
| PASS: Should have rgb of [255,0,0]. |
| PASS: Should have rgba of [255,0,0,1]. |
| PASS: Should have hsl of [0,100,50]. |
| PASS: Should have hsla of [0,100,50,1]. |
| Check components for color 'rgba(128, 128, 128, 0.5)'. |
| PASS: Should have rgb of [128,128,128]. |
| PASS: Should have rgba of [128,128,128,0.5]. |
| PASS: Should have hsl of [0,0,50.2]. |
| PASS: Should have hsla of [0,0,50.2,0.5]. |
| Check components for color 'hsl(0, 0%, 50%)'. |
| PASS: Should have rgb of [127.5,127.5,127.5]. |
| PASS: Should have rgba of [127.5,127.5,127.5,1]. |
| PASS: Should have hsl of [0,0,50]. |
| PASS: Should have hsla of [0,0,50,1]. |
| Check components for color 'hsla(0, 0%, 50%, 0.5)'. |
| PASS: Should have rgb of [127.5,127.5,127.5]. |
| PASS: Should have rgba of [127.5,127.5,127.5,0.5]. |
| PASS: Should have hsl of [0,0,50]. |
| PASS: Should have hsla of [0,0,50,0.5]. |
| |
| -- Running test case: WI.Color.prototype.nextFormat |
| PASS: All format phases of 'transparent' should be as expected. |
| PASS: All format phases of 'red' should be as expected. |
| PASS: All format phases of 'rgb(100, 150, 200)' should be as expected. |
| PASS: All format phases of 'rgba(100, 150, 200, 0.5)' should be as expected. |
| |
| -- Running test case: WI.Color.prototype.toString |
| PASS: Color as 'Original' should be 'RED' |
| PASS: Color as 'Keyword' should be 'red' |
| PASS: Color as 'Short HEX' should be '#f00' |
| PASS: Color as 'HEX' should be '#ff0000' |
| PASS: Color as 'Short HEX with Alpha' should be '#f00f' |
| PASS: Color as 'HEX with Alpha' should be '#ff0000ff' |
| PASS: Color as 'RGB' should be 'rgb(255, 0, 0)' |
| PASS: Color as 'RGBA' should be 'rgba(255, 0, 0, 1)' |
| PASS: Color as 'HSL' should be 'hsl(0, 100%, 50%)' |
| PASS: Color as 'HSLA' should be 'hsla(0, 100%, 50%, 1)' |
| PASS: Color as 'Original' should be 'rgba(100, 200, 255, 0.5)' |
| PASS: Color as 'Keyword' should be 'rgba(100, 200, 255, 0.5)' |
| PASS: Color as 'Short HEX' should be 'rgba(100, 200, 255, 0.5)' |
| PASS: Color as 'HEX' should be 'rgba(100, 200, 255, 0.5)' |
| PASS: Color as 'Short HEX with Alpha' should be '#64c8ff80' |
| PASS: Color as 'HEX with Alpha' should be '#64c8ff80' |
| PASS: Color as 'RGB' should be 'rgba(100, 200, 255, 0.5)' |
| PASS: Color as 'RGBA' should be 'rgba(100, 200, 255, 0.5)' |
| PASS: Color as 'HSL' should be 'hsla(201.29, 100%, 69.61%, 0.5)' |
| PASS: Color as 'HSLA' should be 'hsla(201.29, 100%, 69.61%, 0.5)' |
| |
| -- Running test case: WI.Color.rgb2hsl |
| PASS: Should convert [0,0,0] to [0,0,0]. |
| PASS: Should convert [255,255,255] to [0,0,100]. |
| PASS: Should convert [255,0,0] to [0,100,50]. |
| PASS: Should convert [0,255,0] to [120,100,50]. |
| PASS: Should convert [0,0,255] to [240,100,50]. |
| PASS: Should convert [-1,-1,-1] to [0,0,0]. |
| PASS: Should convert [256,256,256] to [0,0,100]. |
| PASS: Should convert [254.9,0,0] to [0,100,50]. |
| |
| -- Running test case: WI.Color.hsl2rgb |
| PASS: Should convert [0,0,0] to [0,0,0]. |
| PASS: Should convert [0,0,100] to [255,255,255]. |
| PASS: Should convert [0,100,50] to [255,0,0]. |
| PASS: Should convert [120,100,50] to [0,255,0]. |
| PASS: Should convert [240,100,50] to [0,0,255]. |
| PASS: Should convert [-1,-1,-1] to [0,0,0]. |
| PASS: Should convert [361,101,50] to [255,0,0]. |
| PASS: Should convert [361,101,101] to [255,255,255]. |
| |
| -- Running test case: WI.Color.cmyk2rgb |
| PASS: Should convert [0,0,0,1] to [0,0,0]. |
| PASS: Should convert [1,0,0,0] to [0,255,255]. |
| PASS: Should convert [0,1,0,0] to [255,0,255]. |
| PASS: Should convert [0,0,1,0] to [255,255,0]. |
| PASS: Should convert [0,0,0,0] to [255,255,255]. |
| PASS: Should convert [2,0,0,0] to [0,255,255]. |
| PASS: Should convert [-1,0,0,0] to [255,255,255]. |
| |
| -- Running test case: WI.Color.normalized2rgb |
| PASS: Should convert [0,0,0] to [0,0,0]. |
| PASS: Should convert [1,1,1] to [255,255,255]. |
| PASS: Should convert [0.24,0.25,0.26] to [61,64,66]. |
| PASS: Should convert [2,0,0] to [255,0,0]. |
| PASS: Should convert [-1,0,0] to [0,0,0]. |
| |