Is it possible to reuse theme.yaml mechanism for custom attributes?

For example:

I am building a layout (represented by a class) which includes a plot, some interaction controls, some built-in glyphs and etc.

This layout is used multiple times to build a complex dashboard (also represented by a class).

I am willing to provide a convenient way to customize layout colors independently.