Set dynamic color to Calendar entries?

Is there anyway of setting dynamic (on Java) colors of Calendar entries, without having to create classes on css?

I’m not sure what do you mean by “without having to create classes on css”, but try this example:

protected void init(VaadinRequest request) {
    final VerticalLayout layout = new VerticalLayout();
    final Label lbl = new Label("red background label");
    Page.getCurrent().getStyles().add(".red-label { background-color:red; }");


If you were talking about doing the same with pure java (without css code at all), then no, there is no API for that.