Skip to content

Commit 0c600f5

Browse files
committed
adds RGBCCT pixel type
1 parent 51207bf commit 0c600f5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/lib.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,25 @@ pub use {rgb::RGB, rgb::RGB16, rgb::RGB8, rgb::RGBA};
1717
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
1818
pub struct White<C>(pub C);
1919

20+
#[derive(Copy, Clone, Debug, Default, Eq, PartialEq, Ord, PartialOrd, Hash)]
21+
pub struct CctWhite<C>{
22+
pub cold: C,
23+
pub warm: C,
24+
}
25+
2026
/// The RGBW Pixel
2127
///
2228
/// This is used for leds, that in addition to RGB leds also contain a white led
2329
pub type RGBW<ComponentType, WhiteComponentType = ComponentType> =
2430
RGBA<ComponentType, White<WhiteComponentType>>;
2531

32+
33+
/// The RGBCCT Pixel
34+
///
35+
/// This is used for leds that, in addition to RGB leds, also contain two white leds (cold white and warm white)
36+
pub type RGBCCT<ComponentType, CctWhiteComponentType = ComponentType> =
37+
RGBA<ComponentType, CctWhite<CctWhiteComponentType>>;
38+
2639
/// A trait that Smart Led Drivers implement
2740
///
2841
/// The amount of time each iteration of `iterator` might take is undefined.

0 commit comments

Comments
 (0)