Forum Stats

  • 3,782,317 Users
  • 2,254,637 Discussions
  • 7,880,045 Comments

Discussions

How does Apex 'generate' colors that fit together?

Geert01
Geert01 Member Posts: 141 Bronze Badge

I have a Page Navigation region that uses the Cards List Template. When activating the Apply Theme Colors, apex generates different 'fitting 'colors per card. How does Apex do that and can I use that for coloring cards created in a Cards Region?



Tagged:

Best Answer

  • Geert01
    Geert01 Member Posts: 141 Bronze Badge
    Accepted Answer

    Thank you fac586, I know of the modifier class, but as you can see in the image I uploaded, each card has a different color. I had the impression that some mathematical calculation was used to determine colors that look good together. But now, looking at the colors shown in the Universal Theme color table, I get the impression that the 'mathematical' function is no more than 'get the next color'.

Answers

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,344 Red Diamond

    The Theme Colors have been defined by the Universal Theme designers, and are implemented using CSS.

    You can assign specific colors to UI elements by setting the corresponding modifier class names in the CSS Classes properties found on most components.

  • Geert01
    Geert01 Member Posts: 141 Bronze Badge
    Accepted Answer

    Thank you fac586, I know of the modifier class, but as you can see in the image I uploaded, each card has a different color. I had the impression that some mathematical calculation was used to determine colors that look good together. But now, looking at the colors shown in the Universal Theme color table, I get the impression that the 'mathematical' function is no more than 'get the next color'.

  • fac586
    fac586 Senior Technical Architect Member Posts: 20,344 Red Diamond

    Basic physics rather than advanced mathematics. Just a reordering of the visible part of the electromagnetic spectrum, sampled at 13 points rather than the traditional 7 (Richard Of York Gave Battle In Vain as we say here).

    There was originally a little bit of Universal Theme mathematical magic provided in the form of the Theme Roller Color Wheel, but that was very short-lived, appearing in 5.0 and gone in 5.1.