Colors and Theming 086c41c
Colors and Theming 086c41c
086c41c2441946219384197a6c82072b
view on: demo kit nightly build | demo kit latest release
General Recommendations
Different people perceive and interpret colors in different ways, which is something you
must take into account when developing your applications. High-contrast themes are
already available for all OpenUI5 controls.
• Applications need to provide the user with an option to switch themes.
– If the application runs in the SAP Fiori launchpad, this is covered automatically.
• There are two possible ways to change the theme:
and
sap-ui-theme=sap_belize_hcw
sap.ui.getCore().applyTheme(“sap_belize_hcb”);
or
sap.ui.getCore().applyTheme(“sap_belize_hcw”);
• You should avoid writing custom CSS. If you do need custom CSS for some reason,
check to make sure everything is working fine on all available themes.
• If a new theme is created, the color contrast between the elements should be checked.
People with visual impairments and people using the application under less than ideal
circumstances (bad monitor, sunlight hitting the screen, window reflections) may not
be able to read the text easily if the contrast levels are insufficient. Specialized tools
can help you to measure the color contrast.
• resources/sap/m/themes/base/library-parameters.json
• resources/sap/m/themes/sap_hcb/library-parameters.json
• Don’t forget the Retina display. You need to provide 2 versions for an icon (icon.png
and [email protected]).
DON’Ts
• Define a custom color.