is it possible in Liferay to get programmatically color scheme of theme?

I have to include different icons depending of current color scheme. I know that it is possible to do it by using css but in my issue it is better to get color scheme in java code

有帮助吗?

解决方案

If you want to get the color scheme of the current page that you are in try the following code

ColorScheme colorScheme = (ColorScheme )request.getAttribute(WebKeys.WebKeys.COLOR_SCHEME);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top