# CSS Color 4 test coverage report

## 2024-02-07

Prepared by:
  Chris Lilley (W3C)

## 1. Introduction

Tests

This section is not normative, it does not need tests.

### 1.1. Value Definitions

## 2. Color Terminology

Tests

This section provides definitions used later, it does not need tests.

## 3. Applying Color in CSS

### 3.1. Accessibility and Conveying Information By Color

Tests

This section provides authoring guidance, it does not need tests.

### 3.2. Foreground Color: the color property

Tests

- color-001.html (live test) (source)
- color-002.html (live test) (source)
- color-003.html (live test) (source)
- inheritance.html (4 tests) (live test) (source)
- color-interpolation.html (192 tests) (live test) (source)
- color-initial-canvastext.html (2 tests) (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- color-invalid.html (10 tests) (live test) (source)

### 3.3. Transparency: the opacity property

Tests

- t32-opacity-basic-0.0-a.xht (live test) (source)
- t32-opacity-basic-0.6-a.xht (live test) (source)
- t32-opacity-basic-1.0-a.xht (live test) (source)
- t32-opacity-clamping-0.0-b.xht (live test) (source)
- t32-opacity-clamping-1.0-b.xht (live test) (source)
- t32-opacity-offscreen-b.xht (live test) (source)
- t32-opacity-offscreen-multiple-boxes-1-c.xht (live test) (source)
- t32-opacity-offscreen-multiple-boxes-2-c.xht (live test) (source)
- t32-opacity-offscreen-with-alpha-c.xht (live test) (source)
- t32-opacity-zorder-c.xht (live test) (source)
- opacity-computed.html (8 tests) (live test) (source)
- opacity-valid.html (16 tests) (live test) (source)
- opacity-invalid.html (3 tests) (live test) (source)
- composited-filters-under-opacity.html (live test) (source)
- filters-under-will-change-opacity.html (live test) (source)
- color-composition.html (10 tests) (live test) (source)
- opacity-interpolation.html (120 tests) (live test) (source)
- canvas-change-opacity.html (live test) (source)
- opacity-animation-ending-correctly-001.html (live test) (source)
- opacity-animation-ending-correctly-002.html (live test) (source)

Tests

- inline-opacity-float-child.html (live test) (source)

Tests

- opacity-overlapping-letters.html (live test) (source)

Tests

- body-opacity-0-to-1-stacking-context.html (live test) (source)

### 3.4. Color Space of Tagged Images

Tests

- tagged-images-001.html (live test) (source)
- tagged-images-002.html (live test) (source)
- tagged-images-003.html (live test) (source)
- tagged-images-004.html (live test) (source)

- cicp-chunk.html (live test) (source)
- fDAT-inherits-cICP.html (live test) (source)

### 3.5. Color Spaces of Untagged Colors

Tests

- untagged-images-001.html (live test) (source)

## 4. Representing Colors: the <color> type

Tests

This section describes a type, it is primarily tested where that type is used.

Tests

- color-computed-named-color.html (455 tests) (live test) (source)
- color-computed.html (16 tests) (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 4.1. The <color> syntax

Tests

This section provides definitions used later, it does not need tests.

#### 4.1.1. Modern (Space-separated) Color Function Syntax

#### 4.1.2. Legacy (Comma-separated) Color Function Syntax

### 4.2. Representing Transparency in Colors: the <alpha-value> syntax

Tests

This section provides definitions used later, it does not need tests.

### 4.3. Representing Cylindrical-coordinate Hues: the <hue> syntax

Tests

This section provides definitions used later, it does not need tests.

### 4.4. “Missing” Color Components and the none Keyword

Tests

- color-computed-color-function.html (401 tests) (live test) (source)
- color-computed-hsl.html (3735 tests) (live test) (source)
- color-computed-hwb.html (50 tests) (live test) (source)
- color-computed-lab.html (104 tests) (live test) (source)
- color-computed-relative-color.html (947 tests) (live test) (source)
- color-computed-rgb.html (79 tests) (live test) (source)
- color-invalid-hsl.html (23 tests) (live test) (source)
- color-invalid-rgb.html (26 tests) (live test) (source)
- color-valid-color-function.html (258 tests) (live test) (source)
- color-valid-color-mix-function.html (458 tests) (live test) (source)
- color-valid-hsl.html (37 tests) (live test) (source)
- color-valid-hwb.html (34 tests) (live test) (source)
- color-valid-lab.html (116 tests) (live test) (source)
- color-valid-relative-color.html (935 tests) (live test) (source)
- color-valid-rgb.html (48 tests) (live test) (source)

#### 4.4.1. “Powerless” Color Components

### 4.5. Parsing a <color> Value

Tests

This section provides a definition referenced elsewhere, it does not need tests.

## 5. sRGB Colors

### 5.1. The RGB functions: rgb() and rgba()

Tests

- rgb-001.html (live test) (source)
- rgb-002.html (live test) (source)
- rgb-003.html (live test) (source)
- rgb-004.html (live test) (source)
- rgb-005.html (live test) (source)
- rgb-006.html (live test) (source)
- rgb-007.html (live test) (source)
- rgb-008.html (live test) (source)
- out-of-gamut-legacy-rgb.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- color-computed-rgb.html (79 tests) (live test) (source)
- color-invalid-rgb.html (26 tests) (live test) (source)
- color-valid-rgb.html (48 tests) (live test) (source)

Tests

- background-color-rgb-001.html (live test) (source)
- background-color-rgb-002.html (live test) (source)
- background-color-rgb-003.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

Tests

- rgba-001.html (live test) (source)
- rgba-002.html (live test) (source)
- rgba-003.html (live test) (source)
- rgba-004.html (live test) (source)
- rgba-005.html (live test) (source)
- rgba-006.html (live test) (source)
- rgba-007.html (live test) (source)
- rgba-008.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 5.2. The RGB Hexadecimal Notations: #RRGGBB

Tests

- hex-001.html (live test) (source)
- hex-002.html (live test) (source)
- hex-003.html (live test) (source)
- hex-004.html (live test) (source)
- border-bottom-color.xht (live test) (source)
- border-left-color.xht (live test) (source)
- border-right-color.xht (live test) (source)
- border-top-color.xht (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- color-computed-hex-color.html (6 tests) (live test) (source)
- color-invalid-hex-color.html (10 tests) (live test) (source)

## 6. Color Keywords

### 6.1. Named Colors

For historical reasons, this is also referred to as the X11 color set.
Tests

- named-001.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- color-computed-named-color.html (455 tests) (live test) (source)
- color-invalid-named-color.html (184 tests) (live test) (source)

### 6.2. System Colors

Tests

- system-color-consistency.html (27 tests) (live test) (source)
- system-color-support.html (21 tests) (live test) (source)
- color-valid-system-color.html (19 tests) (live test) (source)

Tests

- color-valid.html (16 tests) (live test) (source)
- system-color-compute.html (27 tests) (live test) (source)
- system-color-hightlights-vs-getSelection-001.html (live test) (source)
- system-color-hightlights-vs-getSelection-002.html (live test) (source)

### 6.3. The transparent keyword

Tests

- color-computed.html (16 tests) (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- t423-transparent-1-a.xht (live test) (source)
- t423-transparent-2-a.xht (live test) (source)

### 6.4. The currentcolor keyword

Tests

- border-color-currentcolor.html (live test) (source)
- color-mix-currentcolor-nested-for-color-property.html (live test) (source)
- currentcolor-001.html (live test) (source)
- currentcolor-002.html (live test) (source)
- currentcolor-003.html (live test) (source)
- currentcolor-004.html (live test) (source)
- currentcolor-visited-fallback.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

## 7. HSL Colors: hsl() and hsla() functions

Tests

- hsl-001.html (live test) (source)
- hsl-002.html (live test) (source)
- hsl-003.html (live test) (source)
- hsl-004.html (live test) (source)
- hsl-005.html (live test) (source)
- hsl-006.html (live test) (source)
- hsl-007.html (live test) (source)
- hsl-008.html (live test) (source)
- background-color-hsl-001.html (live test) (source)
- background-color-hsl-002.html (live test) (source)
- background-color-hsl-003.html (live test) (source)
- background-color-hsl-004.html (live test) (source)
- color-computed-hsl.html (3735 tests) (live test) (source)
- color-invalid-hsl.html (23 tests) (live test) (source)
- color-valid-hsl.html (37 tests) (live test) (source)

Tests

- t424-hsl-clip-outside-gamut-b.xht (live test) (source)

Tests

- hsla-001.html (live test) (source)
- hsla-002.html (live test) (source)
- hsla-003.html (live test) (source)
- hsla-004.html (live test) (source)
- hsla-005.html (live test) (source)
- hsla-006.html (live test) (source)
- hsla-007.html (live test) (source)
- hsla-008.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 7.1. Converting HSL Colors to sRGB

### 7.2. Converting sRGB Colors to HSL

### 7.3. Examples of HSL Colors

Tests

This section is not normative, it does not need tests.

## 8. HWB Colors: hwb() function

Tests

- hwb-001.html (live test) (source)
- hwb-002.html (live test) (source)
- hwb-003.html (live test) (source)
- hwb-004.html (live test) (source)
- hwb-005.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- color-computed-hwb.html (50 tests) (live test) (source)
- color-invalid-hwb.html (6 tests) (live test) (source)
- color-valid-hwb.html (34 tests) (live test) (source)

### 8.1. Converting HWB Colors to sRGB

### 8.2. Converting sRGB Colors to HWB

### 8.3. Examples of HWB Colors

Tests

This section is not normative, it does not need tests.

## 9. Device-independent Colors: CIE Lab and LCH, Oklab and Oklch

### 9.1. CIE Lab and LCH

Tests

This section is not normative, it does not need tests.

### 9.2. Oklab and Oklch

Tests

This section is not normative, it does not need tests.

### 9.3. Specifying Lab and LCH: the lab() and lch() functional notations

Tests

- lab-001.html (live test) (source)
- lab-002.html (live test) (source)
- lab-003.html (live test) (source)
- lab-004.html (live test) (source)
- lab-005.html (live test) (source)
- lab-006.html (live test) (source)
- lab-007.html (live test) (source)
- lab-008.html (live test) (source)
- lab-l-over-100-1.html (live test) (source)
- lab-l-over-100-2.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)
- color-computed-lab.html (104 tests) (live test) (source)
- color-invalid-lab.html (18 tests) (live test) (source)
- color-valid-lab.html (116 tests) (live test) (source)

Tests

- lch-001.html (live test) (source)
- lch-002.html (live test) (source)
- lch-003.html (live test) (source)
- lch-004.html (live test) (source)
- lch-005.html (live test) (source)
- lch-006.html (live test) (source)
- lch-007.html (live test) (source)
- lch-008.html (live test) (source)
- lch-009.html (live test) (source)
- lch-010.html (live test) (source)
- lch-l-over-100-1.html (live test) (source)
- lch-l-over-100-2.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 9.4. Specifying Oklab and Oklch: the oklab() and oklch() functional notations

Tests

- oklab-001.html (live test) (source)
- oklab-002.html (live test) (source)
- oklab-003.html (live test) (source)
- oklab-004.html (live test) (source)
- oklab-005.html (live test) (source)
- oklab-006.html (live test) (source)
- oklab-007.html (live test) (source)
- oklab-008.html (live test) (source)
- oklab-009.html (live test) (source)
- oklab-l-over-1-1.html (live test) (source)
- oklab-l-over-1-2.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

Tests

- oklch-001.html (live test) (source)
- oklch-002.html (live test) (source)
- oklch-003.html (live test) (source)
- oklch-004.html (live test) (source)
- oklch-005.html (live test) (source)
- oklch-006.html (live test) (source)
- oklch-007.html (live test) (source)
- oklch-008.html (live test) (source)
- oklch-009.html (live test) (source)
- oklch-010.html (live test) (source)
- oklch-011.html (live test) (source)
- oklch-l-over-1-1.html (live test) (source)
- oklch-l-over-1-2.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 9.5. Converting Lab or Oklab colors to LCH or Oklch colors

### 9.6. Converting LCH or Oklch colors to Lab or Oklab colors

## 10. Predefined Color Spaces

### 10.1. Specifying Predefined Colors: the color() function

Tests

- color-computed-color-function.html (401 tests) (live test) (source)
- color-invalid-color-function.html (115 tests) (live test) (source)
- color-valid-color-function.html (258 tests) (live test) (source)

Tests

- color-valid.html (16 tests) (live test) (source)

### 10.2. The Predefined sRGB Color Space: the sRGB keyword

Tests

- predefined-001.html (live test) (source)
- predefined-002.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 10.3. The Predefined Linear-light sRGB Color Space: the srgb-linear keyword

Tests

- srgb-linear-001.html (live test) (source)
- srgb-linear-002.html (live test) (source)
- srgb-linear-003.html (live test) (source)
- srgb-linear-004.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 10.4. The Predefined Display P3 Color Space: the display-p3 keyword

Tests

- predefined-005.html (live test) (source)
- predefined-006.html (live test) (source)
- display-p3-001.html (live test) (source)
- display-p3-002.html (live test) (source)
- display-p3-003.html (live test) (source)
- display-p3-004.html (live test) (source)
- display-p3-005.html (live test) (source)
- display-p3-006.html (live test) (source)

### 10.5. The Predefined A98 RGB Color Space: the a98-rgb keyword

Tests

- predefined-007.html (live test) (source)
- predefined-008.html (live test) (source)
- a98rgb-001.html (live test) (source)
- a98rgb-002.html (live test) (source)
- a98rgb-003.html (live test) (source)
- a98rgb-004.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 10.6. The Predefined ProPhoto RGB Color Space: the prophoto-rgb keyword

Tests

- predefined-009.html (live test) (source)
- predefined-010.html (live test) (source)
- prophoto-rgb-001.html (live test) (source)
- prophoto-rgb-002.html (live test) (source)
- prophoto-rgb-003.html (live test) (source)
- prophoto-rgb-004.html (live test) (source)
- prophoto-rgb-005.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 10.7. The Predefined ITU-R BT.2020-2 Color Space: the rec2020 keyword

Tests

- predefined-011.html (live test) (source)
- predefined-012.html (live test) (source)
- rec2020-001.html (live test) (source)
- rec2020-002.html (live test) (source)
- rec2020-003.html (live test) (source)
- rec2020-004.html (live test) (source)
- rec2020-005.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 10.8. The Predefined CIE XYZ Color Spaces: the xyz-d50, xyz-d65, and xyz keywords

Tests

- predefined-016.html (live test) (source)
- xyz-001.html (live test) (source)
- xyz-002.html (live test) (source)
- xyz-003.html (live test) (source)
- xyz-004.html (live test) (source)
- xyz-005.html (live test) (source)
- xyz-d50-001.html (live test) (source)
- xyz-d50-002.html (live test) (source)
- xyz-d50-003.html (live test) (source)
- xyz-d50-004.html (live test) (source)
- xyz-d50-005.html (live test) (source)
- xyz-d65-001.html (live test) (source)
- xyz-d65-002.html (live test) (source)
- xyz-d65-003.html (live test) (source)
- xyz-d65-004.html (live test) (source)
- xyz-d65-005.html (live test) (source)
- color-valid.html (16 tests) (live test) (source)

### 10.9. Converting Predefined Color Spaces to Lab or Oklab

### 10.10. Converting Lab or Oklab to Predefined RGB Color Spaces

### 10.11. Converting Between Predefined RGB Color Spaces

### 10.12. Simple Alpha Compositing

## 11. Converting Colors

Tests

This section provides an algorithm used later, it does not need tests.

## 12. Color Interpolation

### 12.1. Color Space for Interpolation

Tests

- color-mix-percents-01.html (live test) (source)
- color-mix-percents-02.html (live test) (source)

- gradients-with-transparent.html (live test) (source)
- gradient-eval-001.html (live test) (source)
- gradient-eval-002.html (live test) (source)
- gradient-eval-003.html (live test) (source)
- gradient-eval-004.html (live test) (source)
- gradient-eval-005.html (live test) (source)
- gradient-eval-006.html (live test) (source)
- gradient-eval-007.html (live test) (source)
- gradient-eval-008.html (live test) (source)
- gradient-eval-009.html (live test) (source)
- gradient-none-interpolation.html (live test) (source)
- legacy-color-gradient.html (live test) (source)
- oklab-gradient.html (live test) (source)
- srgb-gradient.html (live test) (source)
- srgb-linear-gradient.html (live test) (source)
- xyz-gradient.html (live test) (source)
- gradient-interpolation-method-valid.html (1398 tests) (live test) (source)
- gradient-interpolation-method-invalid.html (282 tests) (live test) (source)
- gradient-interpolation-method-computed.html (932 tests) (live test) (source)

### 12.2. Interpolating with Missing Components

### 12.3. Interpolating with Alpha

Tests

- color-transition-premultiplied.html (live test) (source)

### 12.4. Hue Interpolation

Tests

- color-mix-percents-01.html (live test) (source)
- color-mix-percents-02.html (live test) (source)

#### 12.4.1. shorter

#### 12.4.2. longer

#### 12.4.3. increasing

#### 12.4.4. decreasing

## 13. Gamut Mapping

### 13.1. An Introduction to Gamut Mapping

Tests

This section is not normative, it does not need tests.

#### 13.1.1. Clipping

#### 13.1.2. Closest Color (MINDE)

#### 13.1.3. Chroma Reduction

#### 13.1.4. Excessive Chroma Reduction

#### 13.1.5. Chroma Reduction with Local Clipping

#### 13.1.6. Deviations from Perceptual Uniformity: Hue Curvature

### 13.2. CSS Gamut Mapping to an RGB Destination

Tests

Used values of color are not exposed to script, making this hard to test in an automated manner.

#### 13.2.1. Sample Pseudocode for the Binary Search Gamut Mapping Algorithm with Local MINDE

## 14. Resolving <color> Values

Tests

- color-computed-hex-color.html (6 tests) (live test) (source)
- color-computed-named-color.html (455 tests) (live test) (source)
- color-invalid-hex-color.html (10 tests) (live test) (source)
- color-invalid-named-color.html (184 tests) (live test) (source)
- system-color-compute.html (27 tests) (live test) (source)

### 14.1. Resolving sRGB values

Tests

- color-computed-hsl.html (3735 tests) (live test) (source)
- color-computed-hwb.html (50 tests) (live test) (source)
- color-computed-rgb.html (79 tests) (live test) (source)

### 14.2. Resolving Lab and LCH values

### 14.3. Resolving Oklab and Oklch values

### 14.4. Resolving values of the color() function

### 14.5. Resolving other colors

Tests

- currentcolor-001.html (live test) (source)
- currentcolor-002.html (live test) (source)
- currentcolor-003.html (live test) (source)
- system-color-compute.html (27 tests) (live test) (source)

## 15. Serializing <color> Values

### 15.1. Serializing alpha values

### 15.2. Serializing sRGB values

Tests

- system-color-compute.html (27 tests) (live test) (source)

### 15.3. Serializing Lab and LCH values

Tests

- color-computed.html (16 tests) (live test) (source)

### 15.4. Serializing Oklab and Oklch values

Tests

- color-computed.html (16 tests) (live test) (source)

### 15.5. Serializing values of the color() function

Tests

- color-computed.html (16 tests) (live test) (source)

### 15.6. Serializing other colors

## 16. Default Style Rules

## 17. Sample code for Color Conversions

Tests

This section is not normative, it does not need tests.

## 18. Sample Code for ΔE2000 and ΔEOK Color Differences

Tests

This section is not normative, it does not need tests.

### 18.1. ΔE2000

### 18.2. ΔEOK

## Appendix A: Deprecated CSS System Colors

Tests

Results on these 'same as' equivalence tests are not great, which is why the feature is at-risk

- deprecated-sameas-001.html (live test) (source)
- deprecated-sameas-002.html (live test) (source)
- deprecated-sameas-003.html (live test) (source)
- deprecated-sameas-004.html (live test) (source)
- deprecated-sameas-005.html (live test) (source)
- deprecated-sameas-006.html (live test) (source)
- deprecated-sameas-007.html (live test) (source)
- deprecated-sameas-008.html (live test) (source)
- deprecated-sameas-009.html (live test) (source)
- deprecated-sameas-010.html (live test) (source)
- deprecated-sameas-011.html (live test) (source)
- deprecated-sameas-012.html (live test) (source)
- deprecated-sameas-013.html (live test) (source)
- deprecated-sameas-014.html (live test) (source)
- deprecated-sameas-015.html (live test) (source)
- deprecated-sameas-016.html (live test) (source)
- deprecated-sameas-017.html (live test) (source)
- deprecated-sameas-018.html (live test) (source)
- deprecated-sameas-019.html (live test) (source)
- deprecated-sameas-020.html (live test) (source)
- deprecated-sameas-021.html (live test) (source)
- deprecated-sameas-022.html (live test) (source)
- deprecated-sameas-023.html (live test) (source)

## Appendix B: Deprecated Quirky Hex Colors

## Acknowledgments

## Changes

### Changes since the Candidate Recommendation Draft of 1 November 2022

### Changes since the Candidate Recommendation of 5 July 2022

### Changes since the Working Draft of 28 June 2022

### Changes since the Working Draft of 28 April 2022

### Changes since the Working Draft of 15 December 2021

### Changes since the Working Draft of 1 June 2021

### Changes since the Working Draft of 12 November 2020

### Changes since Working Draft of 5 November 2019

### Changes since Working Draft of 05 July 2016

### Changes from Colors 3

## 19. Security Considerations

## 20. Privacy Considerations

## 21. Accessibility Considerations