question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

custom color in tailwind config file not being recognized

See original GitHub issue

Everything works great on this package. The docs are clear and helpful. I only have one issue. When I add a custom color to tailwind.config.js it’s not registering. I’ve restarted expo but still doesn’t work. This is my config file for tailwind:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./screens/**/*.{js,ts,jsx,tsx}",
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {
      colors: {
        "regal-blue": "#50d71e",  // this part is not working
      },
    },
  },
  plugins: [],
};

Do you have any suggestions? It’s running expo 5.4.11 react-native": "0.68.2 react": "17.0.2

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:29 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
marklawlorcommented, Aug 6, 2022

Instead of commenting “same here” can you please share either your tailwind.config.js or your repo. This issue should be resolved, so if it’s still occuring then I need more information.

1reaction
marklawlorcommented, Sep 10, 2022

This doesn’t appear to be an issue with NativeWind, an unfortunately I do not have the capacity to debug your project.

I would recommend following simple troubleshooting:

  • can you import other js files
  • does the same problem occur when creating a new project

Then you can use simple isolation techniques to find your cause.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom colors in my tailwind.config.js file not showing on page
Just move the colors property under theme property, remove from extend property. Then you will only see your defined colors by tailwind css...
Read more >
Tailwind CSS, certain custom colors are not working
I'm trying to use Tailwind custom colors ...
Read more >
Customizing Colors - Tailwind CSS
Using custom colors. If you'd like to completely replace the default color palette with your own custom colors, add your colors directly under...
Read more >
Customer colours tailwind not working - Laracasts
I have my own color scheme and I can't get it to work. I created it in tailwind.config.js. I've put it both under...
Read more >
How to add new colors to tailwind-css and keep the originals ...
Add the below code to your tailwind.config.js file, and now you can customize your color by adding your own color code.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found