@@ -34,7 +34,7 @@ fn serialize_alpha(dest: &mut impl fmt::Write, alpha: f32, legacy_syntax: bool)
3434/// A color with red, green, blue, and alpha components, in a byte each.
3535#[ derive( Clone , Copy , PartialEq , Debug ) ]
3636#[ repr( C ) ]
37- pub struct Rgba {
37+ pub struct RGBA {
3838 /// The red component.
3939 pub red : u8 ,
4040 /// The green component.
@@ -45,7 +45,7 @@ pub struct Rgba {
4545 pub alpha : f32 ,
4646}
4747
48- impl Rgba {
48+ impl RGBA {
4949 /// Constructs a new RGBA value from float components. It expects the red,
5050 /// green, blue and alpha channels in that order, and all values will be
5151 /// clamped to the 0.0 ... 1.0 range.
@@ -134,7 +134,7 @@ impl Rgba {
134134}
135135
136136#[ cfg( feature = "serde" ) ]
137- impl Serialize for Rgba {
137+ impl Serialize for RGBA {
138138 fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
139139 where
140140 S : Serializer ,
@@ -144,17 +144,17 @@ impl Serialize for Rgba {
144144}
145145
146146#[ cfg( feature = "serde" ) ]
147- impl < ' de > Deserialize < ' de > for Rgba {
147+ impl < ' de > Deserialize < ' de > for RGBA {
148148 fn deserialize < D > ( deserializer : D ) -> Result < Self , D :: Error >
149149 where
150150 D : Deserializer < ' de > ,
151151 {
152152 let ( r, g, b, a) = Deserialize :: deserialize ( deserializer) ?;
153- Ok ( Rgba :: new ( r, g, b, a) )
153+ Ok ( RGBA :: new ( r, g, b, a) )
154154 }
155155}
156156
157- impl ToCss for Rgba {
157+ impl ToCss for RGBA {
158158 fn to_css < W > ( & self , dest : & mut W ) -> fmt:: Result
159159 where
160160 W : fmt:: Write ,
@@ -355,7 +355,7 @@ impl_lch_like!(Oklch, "oklch");
355355#[ derive( Clone , Copy , PartialEq , Debug ) ]
356356pub enum AbsoluteColor {
357357 /// Specify sRGB colors directly by their red/green/blue/alpha chanels.
358- Rgba ( Rgba ) ,
358+ Rgba ( RGBA ) ,
359359 /// Specifies a CIELAB color by CIE Lightness and its a- and b-axis hue
360360 /// coordinates (red/green-ness, and yellow/blue-ness) using the CIE LAB
361361 /// rectangular coordinate model.
@@ -407,7 +407,7 @@ pub(crate) const fn rgb(red: u8, green: u8, blue: u8) -> Color {
407407
408408#[ inline]
409409pub ( crate ) const fn rgba ( red : u8 , green : u8 , blue : u8 , alpha : f32 ) -> Color {
410- Color :: Absolute ( AbsoluteColor :: Rgba ( Rgba :: new ( red, green, blue, alpha) ) )
410+ Color :: Absolute ( AbsoluteColor :: Rgba ( RGBA :: new ( red, green, blue, alpha) ) )
411411}
412412
413413/// A <color> value.
@@ -565,7 +565,7 @@ impl Color {
565565 let location = input. current_source_location ( ) ;
566566 let token = input. next ( ) ?;
567567 match * token {
568- Token :: Hash ( ref value) | Token :: IDHash ( ref value) => Rgba :: parse_hash ( value. as_bytes ( ) )
568+ Token :: Hash ( ref value) | Token :: IDHash ( ref value) => RGBA :: parse_hash ( value. as_bytes ( ) )
569569 . map ( |rgba| Color :: Absolute ( AbsoluteColor :: Rgba ( rgba) ) ) ,
570570 Token :: Ident ( ref value) => parse_color_keyword ( & * value) ,
571571 Token :: Function ( ref name) => {
0 commit comments