Design
#rgb
#color
#css
#design
RGB Color
Matches an RGB color value in the format rgb(R, G, B) where each channel is 0–255.
✓ CSS value parsing✓ Design tool input✓ Color conversion
/
/
Test String
3 matches
rgb(255, 0, 0)
rgb(0, 128, 255)
rgb(74, 222, 128)
rr— 'r' — literal charactergg— 'g' — literal characterbb— 'b' — literal character\(\(— \( — escaped character '('\s*space— \s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy)(…)Group #1— Capturing group — captures matched text for reuse or extraction22— '2' — literal character55— '5' — literal character[…]Character class […]— Matches any single character listed in this set||— | — alternation: matches expression on left OR right22— '2' — literal character[…]Character class […]— Matches any single character listed in this set\ddigit— \d — digit (0–9)||— | — alternation: matches expression on left OR right1?1— '1' — literal character — repeated zero or one time (optional) · ? — zero or one time (optional)\ddigit— \d — digit (0–9)\d?digit— \d — digit (0–9) — repeated zero or one time (optional) · ? — zero or one time (optional)\s*space— \s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy),,— ',' — literal character\s*space— \s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy)(…)Group #2— Capturing group — captures matched text for reuse or extraction22— '2' — literal character55— '5' — literal character[…]Character class […]— Matches any single character listed in this set||— | — alternation: matches expression on left OR right22— '2' — literal character[…]Character class […]— Matches any single character listed in this set\ddigit— \d — digit (0–9)||— | — alternation: matches expression on left OR right1?1— '1' — literal character — repeated zero or one time (optional) · ? — zero or one time (optional)\ddigit— \d — digit (0–9)\d?digit— \d — digit (0–9) — repeated zero or one time (optional) · ? — zero or one time (optional)\s*space— \s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy),,— ',' — literal character\s*space— \s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy)(…)Group #3— Capturing group — captures matched text for reuse or extraction22— '2' — literal character55— '5' — literal character[…]Character class […]— Matches any single character listed in this set||— | — alternation: matches expression on left OR right22— '2' — literal character[…]Character class […]— Matches any single character listed in this set\ddigit— \d — digit (0–9)||— | — alternation: matches expression on left OR right1?1— '1' — literal character — repeated zero or one time (optional) · ? — zero or one time (optional)\ddigit— \d — digit (0–9)\d?digit— \d — digit (0–9) — repeated zero or one time (optional) · ? — zero or one time (optional)\s*space— \s — whitespace (space, tab, newline…) — repeated zero or more times (greedy) · * — zero or more times (greedy)\)\)— \) — escaped character ')'Pattern:
105 charsInput: 49 chars100% client-side · private
✓ Valid Examples
- rgb(255, 0, 0)
- rgb(0, 128, 255)
- rgb(74, 222, 128)
✗ Invalid Examples
- rgb(256, 0, 0)
- rgb(0, 0)
- rgba(0, 0, 0, 1)