1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 2 → Provide us with generated avatar data

Discussion in 'XenForo Suggestions' started by CyberAP, Aug 14, 2016.

  1. CyberAP

    CyberAP Well-Known Member

    As it has been pointed out, right now you can not access data for generated avatars directly from template. By this data I mean:
    • Color, generated from username;
    • Symbol, taken as a 1st symbol from username;
    • (Probably) Symbol color, to contrast with original color.
    By providing this data we can:
    • Create effects for generated avatars like special border-color, text-shadow for Symbol, box-shadow with various colors, etc;
    • Use color information to tint SVG image.
    SVG example: https://jsfiddle.net/CyberAP/ow44edkz/
    In this example we could set 2 colors:
    • background (taken from original Color, #E7ECED in this case);
    • and foreground for avatar image itself (taken from Symbol color or generated by LESS with invert or anything else, #55608 in this case).
    We could use more complicated SVG to customize it even further with colors and different functions LESS has to offer.
     
    Last edited: Aug 15, 2016
    Cylent1, JustinHawk, maszd and 2 others like this.

Share This Page