Skip to content

[Bug] bg-black/50 silently fails — NaN oklab channels from lightningcss color-mix resolution #317

@alimaan2935

Description

@alimaan2935

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

bg-black/50 (and any opacity modifier on black) silently produces no style on React Native. The background/border is either invisible or loses its opacity. All other colors work
correctly (bg-red-500/50, bg-white/50, border-white/50, etc.).

Image

Library version

3.0.6

Environment info

System:
    OS: macOS 26.3.1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.14.0
    npm: 11.9.0
  SDKs:
    iOS SDK: iOS 26.2
  IDEs:
    Xcode: 26.3/17C529
  npmPackages:
    expo: ~55.0.9
    react: 19.2.0
    react-native: 0.83.4
    react-native-css: 3.0.6
    nativewind: 5.0.0-preview.3
    tailwindcss: 4.2.2
    lightningcss: 1.30.1
  Expo Workflow: managed

Steps to reproduce

https://github.com/alimaan2935/nativewind-color-mix-bug-repro

git clone https://github.com/alimaan2935/nativewind-color-mix-bug-repro
cd nativewind-color-mix-bug-repro
npm install
npx expo start --clear

Reproducible example repository

https://github.com/alimaan2935/nativewind-color-mix-bug-repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-triagedIssue has been automatically triaged by the auto-triage workflowbugSomething isn't workingconfirmedBug reproduced and confirmed by triage

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions