Unfortunately I don't think Exchange categories are exposed thorough IMAP.
They are however added as a Keyword header to the message it self:
Keywords: Green category,Orange category
So they are easy to obtain (email.Headers["Keywords"]), harder to update/modify.
Following code downloads a message from INBOX, modifies it by adding Keyword
header and uploads it, deleting the original message:
using (Imap client = new Imap())
{
client.ConnectSSL(_session.Server);
client.UseBestLogin(_session.User, _session.Password);
client.SelectInbox();
long uid = client.GetAll()[0];
byte[] eml = client.GetMessageByUID(uid);
MessageInfo info = client.GetMessageInfoByUID(uid);
IMail email = new MailBuilder().CreateFromEml(eml);
email.Headers["Keywords"] = "Green category,Orange category";
client.UploadMessage(email, new UploadMessageInfo{
Flags = info.Flags,
InternalDate = info.Envelope.InternalDateString});
client.DeleteMessageByUID(uid);
client.Close();
}