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

Function color_enum_round

crates/chromashift/src/round.rs:150–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148
149 #[test]
150 fn color_enum_round() {
151 let rounded = Color::Oklch(Oklch::new(0.6593827, 0.30412345, 203.27412, 100.0)).round();
152 assert_eq!(rounded, Color::Oklch(Oklch::new(0.659, 0.304, 203.3, 100.0)));
153 }
154
155 #[test]
156 fn round_stays_perceptually_close() {

Callers

nothing calls this directly

Calls 2

OklchClass · 0.85
roundMethod · 0.80

Tested by

no test coverage detected