/* Set the PM background color (useful when running PC/2 */
/* as the WPS (WorkPlace Shell) process                  */
parse upper arg ColorRed ColorGreen ColorBlue .
call RxFuncAdd "SysIni", "RexxUtil", "SysIni"
AppName = "PM_Colors"
KeyName = "Background"
Value = ''
if ColorRed='' then
    ColorRed='0'
if ColorGreen='' then
    ColorGreen='0'
if ColorBlue='' then
    ColorBlue='0'
ColorRed = Value(ColorRed)
if ColorRed>255 then 
    ColorRed=0
ColorGreen = Value(ColorGreen)
if ColorGreen>255 then
    ColorGreen=0
ColorBlue = Value(ColorBlue)
if ColorBlue>255 then
    ColorBlue=127
Value=ColorRed||" "||ColorGreen||" "||ColorBlue
call SysIni "USER", AppName, KeyName, Value
say "Changing background color to "||Value||" (Red Green Blue) will change after"
say "next reboot"
exit

