Loading
Multi-Theme Tailwind 16 exercises
Problem

Write a Function That Replaces Hard-Coded Theme Colors

Here is a fancy bit of UI that pulls from the Tailwind config file and outputs a color swatch for each themable color generated with the CSS variable:

![](http://res.cloudinary.com/pro-tailwind/image/upload/v1671338057/workshops/multi-theme-strategy-workshop/01-12-01-dynanic_utilities_1_00-04560-here

Loading exercise

Transcript

0:00 Here's a pretty fancy bit of UI here that pulls from the Tailwind config file and outputs a color swatch for each theme-able color generated with the CSS variable. You are going to have to create a get-color utilities with CSS variable references function.

0:17 What you want to be able to do is output an object that will replace this hard-coded object. This is quite similar to the approach before. The code is a bit different, obviously, but the reasoning is the same. Good luck. Once again, if it's a little bit over your head, don't worry, struggle for a bit, and then come watch the solution.