kCompleteValidHexPattern top-level constant

String const kCompleteValidHexPattern

Matches a complete hex colour: an optional # followed by exactly 3, 6 or 8 hex digits (RGB, RRGGBB or AARRGGBB).

Implementation

const String kCompleteValidHexPattern =
    r'^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$';