Is there any way to override the standard behavior (javascript) of Ribbon controls? For example, I need the Color selector populate not all the colors available, but a restricted subset of them. In the CMDUI.xml file I see that Ribbon.EditingTools.CPEditTab.Font.FontColor element has an attribute PopulatequeryCommand="GetFontColorMenuXml". So, is it any way to override this out-of-the-box Command, so that it returns specified colors instead of standard set, or I need to develop my own color picker and replace the standard with it?

2 Answers 2


I don't think that this can be done without changing OOTB javascript and definition files. This is not recommended.

So, yes - you need to develop your own color picker, hide default one and show custom in same place.

I also found this article:


In short, you can customize it. Here is a nice example:


  • Skog, you're always welcome :) Commented Jan 23, 2012 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.