@@ -103,6 +103,9 @@ pub enum ColorSpace {
103103 /// A color specified with the color(..) function and the "display-p3"
104104 /// color space, e.g. "color(display-p3 0.84 0.19 0.72)".
105105 DisplayP3 ,
106+ /// A color specified with the color(..) function and the "display-p3-linear"
107+ /// color space.
108+ DisplayP3Linear ,
106109 /// A color specified with the color(..) function and the "a98-rgb" color
107110 /// space, e.g. "color(a98-rgb 0.44091 0.49971 0.37408)".
108111 A98Rgb ,
@@ -143,6 +146,7 @@ impl ColorSpace {
143146 Self :: Srgb
144147 | Self :: SrgbLinear
145148 | Self :: DisplayP3
149+ | Self :: DisplayP3Linear
146150 | Self :: A98Rgb
147151 | Self :: ProphotoRgb
148152 | Self :: Rec2020
@@ -506,6 +510,7 @@ impl AbsoluteColor {
506510 } ,
507511 ColorSpace :: SrgbLinear
508512 | ColorSpace :: DisplayP3
513+ | ColorSpace :: DisplayP3Linear
509514 | ColorSpace :: A98Rgb
510515 | ColorSpace :: ProphotoRgb
511516 | ColorSpace :: Rec2020 => match channel_keyword {
@@ -576,6 +581,7 @@ impl AbsoluteColor {
576581 Hwb => convert:: to_xyz :: < convert:: Hwb > ( & components) ,
577582 SrgbLinear => convert:: to_xyz :: < convert:: SrgbLinear > ( & components) ,
578583 DisplayP3 => convert:: to_xyz :: < convert:: DisplayP3 > ( & components) ,
584+ DisplayP3Linear => convert:: to_xyz :: < convert:: DisplayP3Linear > ( & components) ,
579585 A98Rgb => convert:: to_xyz :: < convert:: A98Rgb > ( & components) ,
580586 ProphotoRgb => convert:: to_xyz :: < convert:: ProphotoRgb > ( & components) ,
581587 Rec2020 => convert:: to_xyz :: < convert:: Rec2020 > ( & components) ,
@@ -593,6 +599,9 @@ impl AbsoluteColor {
593599 Hwb => convert:: from_xyz :: < convert:: Hwb > ( & xyz, white_point) ,
594600 SrgbLinear => convert:: from_xyz :: < convert:: SrgbLinear > ( & xyz, white_point) ,
595601 DisplayP3 => convert:: from_xyz :: < convert:: DisplayP3 > ( & xyz, white_point) ,
602+ DisplayP3Linear => {
603+ convert:: from_xyz :: < convert:: DisplayP3Linear > ( & xyz, white_point)
604+ } ,
596605 A98Rgb => convert:: from_xyz :: < convert:: A98Rgb > ( & xyz, white_point) ,
597606 ProphotoRgb => convert:: from_xyz :: < convert:: ProphotoRgb > ( & xyz, white_point) ,
598607 Rec2020 => convert:: from_xyz :: < convert:: Rec2020 > ( & xyz, white_point) ,
@@ -630,6 +639,7 @@ impl From<PredefinedColorSpace> for ColorSpace {
630639 PredefinedColorSpace :: Srgb => ColorSpace :: Srgb ,
631640 PredefinedColorSpace :: SrgbLinear => ColorSpace :: SrgbLinear ,
632641 PredefinedColorSpace :: DisplayP3 => ColorSpace :: DisplayP3 ,
642+ PredefinedColorSpace :: DisplayP3Linear => ColorSpace :: DisplayP3Linear ,
633643 PredefinedColorSpace :: A98Rgb => ColorSpace :: A98Rgb ,
634644 PredefinedColorSpace :: ProphotoRgb => ColorSpace :: ProphotoRgb ,
635645 PredefinedColorSpace :: Rec2020 => ColorSpace :: Rec2020 ,
0 commit comments