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

3.3. Transparency: the opacity property

Tests
Tests
Tests
Tests

3.4. Color Space of Tagged Images

Tests

3.5. Color Spaces of Untagged Colors

Tests

4. Representing Colors: the <color> type

Tests

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


Tests

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

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
Tests
Tests

5.2. The RGB Hexadecimal Notations: #RRGGBB

Tests

6. Color Keywords

6.1. Named Colors

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

6.3. The transparent keyword

Tests

6.4. The currentcolor keyword

Tests

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

Tests
Tests
Tests

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

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
Tests

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

Tests
Tests

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
Tests

10.2. The Predefined sRGB Color Space: the sRGB keyword

Tests

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

Tests

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

Tests

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

Tests

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

Tests

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

Tests

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

Tests

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

12.2. Interpolating with Missing Components

12.3. Interpolating with Alpha

Tests

12.4. Hue Interpolation

Tests

12.4.1.

12.4.2.

12.4.3.

12.4.4.

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

14.1. Resolving sRGB values

Tests

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

15. Serializing <color> Values

15.1. Serializing alpha values

15.2. Serializing sRGB values

Tests

15.3. Serializing Lab and LCH values

Tests

15.4. Serializing Oklab and Oklch values

Tests

15.5. Serializing values of the color() function

Tests

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


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