[RSS Feed/News] Discord embed fail to parse theme-color with rgb() components

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
Previous parse_less_color would render the to #xxyyzz format which Discord would read and use to tint the embed.

As a result of this change; Fixed - Inefficient code in PAGE_CONTAINER this no longer works.

This sort of regex looks able to extract and convert things as required without requiring a full LESS parser.
PHP:

if (\preg_match('/^\s*(?:rgb|rgba)\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d{1,3})\s*)?\)\s*$/i'...

Read more

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom