11-13-2013 10:36 AM
Hi all,
Client wants to use colors other than those provided in the Smartstyle color palette in a Smartform.
I would like to know whether there is a way of achieving this? (With or without modifying standard ABAP code)
The RGB values needed are:
R | G | B |
0 | 129 | 147 |
Hex CODE: #008193 |
and
R | G | B |
150 | 35 | 153 |
Hex CODE: #962399 |
These values are not included in the Smartstyle. As far as I know, the RGB values of the color palette are hardcoded and loaded at runtime in SAP in the sub-routine load_color_defs of include LSTXBSF02.
Therefore, is there a way of using custom color instead of those provided in the standard color palette? Or is there a way of doing this in the smartform itself?
Many thanks.
Rishi.
11-13-2013 3:18 PM
Hi,
I found the solution. The RGB values of the custom smartstyle are stored in the table STXSPARA.
Hence you can modify its RGB values according to your custom color and it works . That's the easiest solution.
Thanks.
Rishi.
11-13-2013 10:43 AM
Yes, I have been asked to use a specific pink from Pantone in smartforms. Finally I have used a standard pink which is very near.
However I found a way to change the color dynamically at runtime on SCN. I tried it, it worked, check that :
http://wiki.scn.sap.com/wiki/display/Snippets/Dynamic+Background+Colors+in+SmartForms
11-13-2013 10:54 AM
11-13-2013 10:58 AM
Hi Pascal,
Thanks for sharing this info. But I wonder whether you were able to change the font color dynamically or the background color? Because mine is the font color..
Thanks.
Rishi.
11-13-2013 11:13 AM
I had to change the background color. Indeed, I don't know how I would have done to change the font color. I thought it was as easy as the background but it seems that it's not...
11-13-2013 3:18 PM
Hi,
I found the solution. The RGB values of the custom smartstyle are stored in the table STXSPARA.
Hence you can modify its RGB values according to your custom color and it works . That's the easiest solution.
Thanks.
Rishi.
12-12-2013 10:39 AM
Hi Rishi,
I have to use the below mentioned RGB values, as per the requirement.
Could you please guide me how to change the RGB values of custom smartstyle stored, in the table STXSPARA?
Do we have any standard program, to do this?
Or can we write a custom program to change the values for the custom ones?
The RGB values needed are:
R | G | B |
0 | 65 | 132 |
Thanks.
Regards,
Dinakar
01-08-2014 2:14 PM
Hello Dinakar,
Sorry for late reply. You can modify the custom smartstyle in STXSPARA using the tcode SE16N and put modified line in a TR.
Kind Regards.