(in-package :example) (use-package :oli) (sd-defdialog 'sd_change_face_color :dialog-title "Change Face Color" :variables '( (SelFace :title "Select Face" :selection *sd-face-seltype* :after-input (Color_Face SelFace Option) ) (Option :title "Color" :Range ((0 :label "Black") (1 :label "Dark Gray") (2 :label "Light Gray") (3 :label "White") (4 :label "Magenta")(5 :label "Red") (6 :label "Green") (7 :label "Yellow") (8 :label "Blue") (9 :label "Cyan") ) :initial-value 2 :next-variable 'SelFace ) );variables :local-functions '( (Color_Face (Face Opt) ;;Create the color variables (setq Color (cond ((= Opt 0) "0.000,0.000,0.000" );;Black ((= Opt 1) "0.300,0.300,0.300" );;Dark Gray ((= Opt 2) "0.600,0.600,0.600" );;Light Gray ((= Opt 3) "1.000,1.000,1.000" );;White ((= Opt 4) "1.000,0.000,1.000" );;Magenta ((= Opt 5) "1.000,0.000,0.000" );;Red ((= Opt 6) "0.000,1.000,0.000" );;Green ((= Opt 7) "1.000,1.000,0.000" );;Yellow ((= Opt 8) "0.000,0.000,1.000" );;Blue ((= Opt 9) "0.000,1.000,1.000" );;Cyan );cond );setq ;;Now change the base color of the face (sd-call-cmds(set_face_color Face :color (sd-rgb-to-color (read-from-string Color)) ) :failure (print " Error")) ;;Now go back to the Select Face variable (sd-put-buffer ":SelFace") );Color_face );local-functions );sd-defdialog