A minimal test with a gradient brush (you can use different brushes/fonts to colorize letters), to be improved by adding properties for the text, background, mouse hover, etc... :
(remove space at each On Paint, editor bug...)
public partial class CustomButton : Button
{
protected override void On Paint(PaintEventArgs pevent)
{
Text = "";
base.On Paint(pevent);
Text = "This is a test";
using (Font font = new Font("Arial", 20, FontStyle.Bold, GraphicsUnit.Point))
{
using (LinearGradientBrush brush = new LinearGradientBrush(new Rectangle(0, 0, Width, Height), Color.Blue, Color.Red, LinearGradientMode.Horizontal))
{
StringFormat stringFormat = new StringFormat();
stringFormat.Alignment = StringAlignment.Center;
stringFormat.LineAlignment = StringAlignment.Center;
Rectangle rect = new Rectangle(0, 0, Width, Height);
//pevent.Graphics.FillRectangle(new SolidBrush(Color.Yellow), rect);
pevent.Graphics.DrawString(Text, font, brush, rect, stringFormat);
}
}
}
}