MCPcopy Create free account
hub / github.com/csskit/csskit / channel

Method channel

crates/css_ast/src/functions/relative_color.rs:659–666  ·  view source on GitHub ↗
(&self, kw: &RgbChannelKeyword)

Source from the content-addressed store, hash-verified

657
658 impl ChannelMap<RgbChannelKeyword> for Srgb {
659 fn channel(&self, kw: &RgbChannelKeyword) -> f32 {
660 match kw {
661 RgbChannelKeyword::R(_) => self.red as f32,
662 RgbChannelKeyword::G(_) => self.green as f32,
663 RgbChannelKeyword::B(_) => self.blue as f32,
664 RgbChannelKeyword::Alpha(_) => self.alpha,
665 }
666 }
667 }
668
669 impl ChannelMap<HslChannelKeyword> for Hsl {

Callers 3

resolve_channelFunction · 0.80
resolve_alphaFunction · 0.80
resolve_hue_channelFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected