Web
#color
#css
#hex
#web
Hex Color
CSS hex color code in #RGB or #RRGGBB format (case-insensitive).
✓ CSS preprocessor tooling✓ Design token validation✓ Color picker inputs
✓ Valid Examples
- #fff
- #FFF
- #a3B2c1
- #000000
- #FF5733
✗ Invalid Examples
- #gggggg
- #12345
- fff
- rgb(255,0,0)
Usage & Integration
Validate Hex Color natively in your backend or frontend without copying regex strings.
Node / Edge
import { validate } from '@regexto/validators';
validate('hex-color', '...');Python
from regexto_validators import validate
validate("hex-color", "...")Go
import "github.com/regex-to/validators-go"
valid, err := validators.Validate("hex-color", "...")PHP
use RegexTo\Validators\Validator;
Validator::validate('hex-color', '...');Rust
use regexto_validators::validate;
let is_valid = validate("hex-color", "...").unwrap();