Skip to content

Conversation

@pull
Copy link

@pull pull bot commented May 23, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary:
`isColorMeaningful` is the only place in xplat code that currently uses `colorComponentsFromColor`, which assumes that a color is an RGBA value.  When implementing `PlatformColor` for windows, where colors might be complex patterns or effects, I'd like to keep the details of `SharedColor` isolated within `SharedColor`.  This change moves `isColorMeaningful` into `color.cpp`, where each platform can provide an implementation that takes into account its platform specific color capabilities.

See microsoft/react-native-windows#7801 for an example of window's SharedColor which can be either an RGBA value, or a name of a native color/brush.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[Internal] [Changed] - Move isColorMeaningful to platform specific code

Pull Request resolved: #31557

Test Plan: This shouldn't change any of the code, its just moving the existing function - normal CI/automation should be plenty of validation.

Reviewed By: JoshuaGross, sammy-SC

Differential Revision: D28557698

Pulled By: mdvacca

fbshipit-source-id: 2a94850fe9c5037598107e1307f4153cee6491fb
@pull pull bot added the ⤵️ pull label May 23, 2021
@pull pull bot merged commit 7aeac42 into MLH-Fellowship:master May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant