diff --git a/lib/DDG/Goodie/ColorCodes.pm b/lib/DDG/Goodie/ColorCodes.pm index 2feec35ce..f0937512a 100644 --- a/lib/DDG/Goodie/ColorCodes.pm +++ b/lib/DDG/Goodie/ColorCodes.pm @@ -21,7 +21,7 @@ my $typestr = join '|', keys %types; $typestr =~ s/([#\^\$\*\+\?])/\\$1/g; triggers query_raw => qr/^ - (?:(.+)\s+(.+)\s+colou?r(?:\s+code)| # handles "rgb red color code", "red rgb color code", etc + (?:(.+)\s+(.+)\s+colou?r(?:\s+code)?| # handles "rgb red color code", "red rgb color code", etc (.+)\s+colou?r(?:\s+code)?(?:\s+for)?\s+(.+)| # handles "rgb color code for red", "red color code for html", etc ($typestr)\s*:?\s*\(?\s*(.+?)\s*\)?| # handles "rgb( red )", "rgb:255,0,0", "rgb(255 0 0)", etc \#([0-9a-f]{3,6})) # handles #00f, #0000ff, etc