MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / parse_hex_nibble

Function parse_hex_nibble

crates/opencode-tui/src/theme/mod.rs:586–592  ·  view source on GitHub ↗
(c: u8)

Source from the content-addressed store, hash-verified

584}
585
586fn parse_hex_nibble(c: u8) -> Option<u8> {
587 match c {
588 b'0'..=b'9' => Some(c - b'0'),
589 b'a'..=b'f' => Some(10 + c - b'a'),
590 _ => None,
591 }
592}
593
594fn parse_hex_byte(a: u8, b: u8) -> Option<u8> {
595 let high = parse_hex_nibble(a)?;

Callers 2

parse_color_literalFunction · 0.85
parse_hex_byteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected