Get and Set colour theme via code editor

Is there a way to get the color code from the theme then set to an element’s color or background?

@wix76569 anyone please? is this even possible yes/no?