| Tests that the displayed string for colors correctly handles clipped CSS values and RGB percentages. |
| |
| |
| Running: testColors |
| |
| color: red |
| simple: true |
| original: red |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: #F00 |
| simple: true |
| original: #F00 |
| nickname: red |
| hex: #ff0000 |
| shorthex: #F00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: #F00F |
| simple: true |
| original: #F00F |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #F00F |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: #FF0000 |
| simple: true |
| original: #FF0000 |
| nickname: red |
| hex: #FF0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: #FF0000FF |
| simple: true |
| original: #FF0000FF |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #FF0000FF |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: rgb(255,0,0) |
| simple: true |
| original: rgb(255,0,0) |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255,0,0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: rgb(300,0,0) |
| simple: true |
| original: rgb(300,0,0) |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: rgb(255,-10,0) |
| simple: true |
| original: rgb(255,-10,0) |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: rgb(110%, 0%, 0%) |
| simple: true |
| original: rgb(110%, 0%, 0%) |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| color: rgba(0,0,0,0.5) |
| simple: false |
| original: rgba(0,0,0,0.5) |
| hexa: #00000080 |
| shorthexa: null |
| rgb: rgb(0 0 0 / 50%) |
| rgba: rgba(0,0,0,0.5) |
| hsl: hsl(0deg 0% 0% / 50%) |
| hsla: hsl(0deg 0% 0% / 50%) |
| |
| color: rgb(0,0,0,50%) |
| simple: false |
| original: rgb(0,0,0,50%) |
| hexa: #00000080 |
| shorthexa: null |
| rgb: rgb(0 0 0 / 50%) |
| rgba: rgb(0,0,0,50%) |
| hsl: hsl(0deg 0% 0% / 50%) |
| hsla: hsl(0deg 0% 0% / 50%) |
| |
| color: rgb( 0 0 0 / 50% ) |
| simple: false |
| original: rgb( 0 0 0 / 50% ) |
| hexa: #00000080 |
| shorthexa: null |
| rgb: rgb(0 0 0 / 50%) |
| rgba: rgb( 0 0 0 / 50% ) |
| hsl: hsl(0deg 0% 0% / 50%) |
| hsla: hsl(0deg 0% 0% / 50%) |
| |
| color: rgb(1 1 1/1) |
| simple: true |
| original: rgb(1 1 1/1) |
| hex: #010101 |
| hexa: #010101ff |
| shorthexa: null |
| rgb: rgb(1 1 1) |
| hsl: hsl(0deg 0% 0%) |
| |
| color: rgb(1 1 1/ 1) |
| simple: true |
| original: rgb(1 1 1/ 1) |
| hex: #010101 |
| hexa: #010101ff |
| shorthexa: null |
| rgb: rgb(1 1 1) |
| hsl: hsl(0deg 0% 0%) |
| |
| color: rgba(1.5 1.5 1.5) |
| simple: true |
| original: rgba(1.5 1.5 1.5) |
| hex: #020202 |
| hexa: #020202ff |
| shorthexa: null |
| rgb: rgba(1.5 1.5 1.5) |
| hsl: hsl(0deg 0% 1%) |
| |
| color: hsl(-120, 100%, 50%) |
| simple: true |
| original: hsl(-120, 100%, 50%) |
| nickname: blue |
| hex: #0000ff |
| shorthex: #00f |
| hexa: #0000ffff |
| shorthexa: #00ff |
| rgb: rgb(0 0 255) |
| hsl: hsl(-120, 100%, 50%) |
| |
| color: hsl(-120deg, 100%, 50%) |
| simple: true |
| original: hsl(-120deg, 100%, 50%) |
| nickname: blue |
| hex: #0000ff |
| shorthex: #00f |
| hexa: #0000ffff |
| shorthexa: #00ff |
| rgb: rgb(0 0 255) |
| hsl: hsl(-120deg, 100%, 50%) |
| |
| color: hsl(-120, 200%, 200%) |
| simple: true |
| original: hsl(-120, 200%, 200%) |
| nickname: white |
| hex: #ffffff |
| shorthex: #fff |
| hexa: #ffffffff |
| shorthexa: #ffff |
| rgb: rgb(255 255 255) |
| hsl: hsl(-120, 200%, 200%) |
| |
| color: hsl(-120, -200%, -200%) |
| simple: true |
| original: hsl(-120, -200%, -200%) |
| nickname: black |
| hex: #000000 |
| shorthex: #000 |
| hexa: #000000ff |
| shorthexa: #000f |
| rgb: rgb(0 0 0) |
| hsl: hsl(0deg 0% 0%) |
| |
| color: hsla(-120, -200%, -200%, -5) |
| simple: false |
| original: hsla(-120, -200%, -200%, -5) |
| nickname: transparent |
| hexa: #00000000 |
| shorthexa: #0000 |
| rgb: rgb(0 0 0 / 0%) |
| rgba: rgb(0 0 0 / 0%) |
| hsl: hsl(0deg 0% 0% / 0%) |
| hsla: hsl(0deg 0% 0% / 0%) |
| |
| color: hsla(240,100%,50%,0.05) |
| simple: false |
| original: hsla(240,100%,50%,0.05) |
| hexa: #0000ff0d |
| shorthexa: null |
| rgb: rgb(0 0 255 / 5%) |
| rgba: rgb(0 0 255 / 5%) |
| hsl: hsl(240deg 100% 50% / 5%) |
| hsla: hsla(240,100%,50%,0.05) |
| |
| color: hsl(200.5,0%,50%) |
| simple: true |
| original: hsl(200.5,0%,50%) |
| nickname: grey |
| hex: #808080 |
| hexa: #808080ff |
| shorthexa: null |
| rgb: rgb(128 128 128) |
| hsl: hsl(200.5,0%,50%) |
| |
| color: hsla(200,1.5%,50%,1) |
| simple: true |
| original: hsla(200,1.5%,50%,1) |
| hex: #7e8081 |
| hexa: #7e8081ff |
| shorthexa: null |
| rgb: rgb(126 128 129) |
| hsl: hsl(200deg 1% 50%) |
| |
| color: rgba(0,0,0,.5) |
| simple: false |
| original: rgba(0,0,0,.5) |
| hexa: #00000080 |
| shorthexa: null |
| rgb: rgb(0 0 0 / 50%) |
| rgba: rgba(0,0,0,.5) |
| hsl: hsl(0deg 0% 0% / 50%) |
| hsla: hsl(0deg 0% 0% / 50%) |
| |
| color: hsla(.5,.5%,.5%,.5) |
| simple: false |
| original: hsla(.5,.5%,.5%,.5) |
| hexa: #01010180 |
| shorthexa: null |
| rgb: rgb(1 1 1 / 50%) |
| rgba: rgb(1 1 1 / 50%) |
| hsl: hsl(1deg 0% 1% / 50%) |
| hsla: hsla(.5,.5%,.5%,.5) |
| |
| color: hsla(100.5,50.5%,50.5%,.5) |
| simple: false |
| original: hsla(100.5,50.5%,50.5%,.5) |
| hexa: #6ac14180 |
| shorthexa: null |
| rgb: rgb(106 193 65 / 50%) |
| rgba: rgb(106 193 65 / 50%) |
| hsl: hsl(101deg 50% 51% / 50%) |
| hsla: hsla(100.5,50.5%,50.5%,.5) |
| |
| color: rgba(255, 0, 0, -5) |
| simple: false |
| original: rgba(255, 0, 0, -5) |
| hexa: #ff000000 |
| shorthexa: #f000 |
| rgb: rgb(255 0 0 / 0%) |
| rgba: rgb(255 0 0 / 0%) |
| hsl: hsl(0deg 100% 50% / 0%) |
| hsla: hsl(0deg 100% 50% / 0%) |
| |
| color: rgba(255, 0, 0, 5) |
| simple: true |
| original: rgba(255, 0, 0, 5) |
| nickname: red |
| hex: #ff0000 |
| shorthex: #f00 |
| hexa: #ff0000ff |
| shorthexa: #f00f |
| rgb: rgb(255 0 0) |
| hsl: hsl(0deg 100% 50%) |
| |
| Running: testInvalidColors |
| |
| SUCCESS: parsed invalid color none to null |
| |
| SUCCESS: parsed invalid color #00000 to null |
| |
| SUCCESS: parsed invalid color #ggg to null |
| |
| SUCCESS: parsed invalid color rgb(a,b,c) to null |
| |
| SUCCESS: parsed invalid color rgb(a,b,c,d) to null |
| |
| SUCCESS: parsed invalid color rgba(0 0 0 1%) to null |
| |
| SUCCESS: parsed invalid color rgba(0,0,0,) to null |
| |
| SUCCESS: parsed invalid color rgba(0 0, 0) to null |
| |
| SUCCESS: parsed invalid color rgba(1 1 1 / ) to null |
| |
| SUCCESS: parsed invalid color rgb(1 1 / 1) to null |
| |
| SUCCESS: parsed invalid color rgb(1 1/1) to null |
| |
| SUCCESS: parsed invalid color hsl(0,0,0) to null |
| |
| SUCCESS: parsed invalid color hsl(0%, 0%, 0%) to null |
| |
| SUCCESS: parsed invalid color hsla(0,,0,1) to null |
| |
| SUCCESS: parsed invalid color hsl(0, 0%, 0) to null |
| |
| SUCCESS: parsed invalid color hsl(a,b,c) to null |
| |
| SUCCESS: parsed invalid color hsla(0,0,0,0) to null |
| |
| SUCCESS: parsed invalid color hsla(0 0% 0% 0) to null |
| |
| SUCCESS: parsed invalid color hsla(0 turn, 0, 0, 0) to null |
| |
| SUCCESS: parsed invalid color hsla to null |
| |