0
0
Tailwindmarkup~10 mins

Overriding color palette in Tailwind - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to override the default blue color in Tailwind CSS.

Tailwind
module.exports = {
  theme: {
    extend: {
      colors: {
        blue: [1]
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A'blue-500'
B'#1DA1F2'
C{ '500': '#1DA1F2' }
D{ blue: '#1DA1F2' }
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of an object for colors.
Not specifying the shade key like '500'.
2fill in blank
medium

Complete the code to add a custom color named 'brand' with hex #123456.

Tailwind
module.exports = {
  theme: {
    extend: {
      colors: {
        brand: [1]
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A'#123456'
B{ 'DEFAULT': '#123456' }
C'brand-500'
D{ brand: '#123456' }
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string directly without 'DEFAULT' key.
Nesting the color under the same name again.
3fill in blank
hard

Fix the error in the code to correctly override the red color's 600 shade.

Tailwind
module.exports = {
  theme: {
    extend: {
      colors: {
        red: [1]
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A{ 600: '#E3342F' }
B'#E3342F'
C{ red: '#E3342F' }
D'red-600'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of an object.
Nesting the color under 'red' again.
4fill in blank
hard

Fill both blanks to add a custom green color with shades 400 and 700.

Tailwind
module.exports = {
  theme: {
    extend: {
      colors: {
        green: {
          400: [1],
          700: [2]
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A'#68D391'
B'#2F855A'
C'#48BB78'
D'#276749'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the shade numbers and colors.
Using invalid hex codes.
5fill in blank
hard

Fill all three blanks to override the gray color with shades 100, 500, and 900.

Tailwind
module.exports = {
  theme: {
    extend: {
      colors: {
        gray: {
          100: [1],
          500: [2],
          900: [3]
        }
      }
    }
  }
}
Drag options to blanks, or click blank then click option'
A'#F7FAFC'
B'#A0AEC0'
C'#1A202C'
D'#CBD5E0'
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the colors for different shades.
Using colors not matching Tailwind's gray scale.