(with the help of MSDN and google)
You need to "find" the button by ID (kind of a bummer, but I've not looked further into that) in the handler of the button
// new handler for the button in the ribbon bar. (created when editing the ribbon in the resource editor
ON_COMMAND(ID_BUTTON5, &CMainFrame::OnColorButton)
void CMainFrame::OnColorButton()
{
CMFCRibbonColorButton* pColorBtn = DYNAMIC_DOWNCAST( CMFCRibbonColorButton, m_wndRibbonBar.FindByID(ID_BUTTON5));
COLORREF color = pColorBtn->GetColor();
}
(tried on VS11, I don't have other version at home, so YMMV).