Skip to content

Conversation

hertzdude
Copy link

No description provided.

@@ -19,3 +19,9 @@
color_hexa_validator = RegexValidator(
COLOR_HEXA_RE, _("Enter a valid hexa color, eg. #00000000"), "invalid"
)


COLOR_RGB_RE = re_compile("(#([\da-f]{3}){1,2}|(rgb|hsl)a\((\d{1,3}%?,\s?){3}(1|0?\.\d+)\)|(rgb|hsl)\(\d{1,3}%?(,\s?\d{1,3}%?){2}\))")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regular expression is too complex for doing just RGB colors validation.

Copy link
Owner

@fabiocaccamo fabiocaccamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. If we add RGB colors support, we should add also RGBA colors support.
  2. The PR doesn't pass tests.

@hertzdude
Copy link
Author

OK, I'll do it within a couple of days.

@fabiocaccamo
Copy link
Owner

@hertzdude any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants