We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The rendered SVG in React Native appears darker than the original file.
original svg: screenshot using react-native-svg:
Here is the code:
import React from 'react' import { SvgXml } from 'react-native-svg'; import { deviceHeight } from '@src/configs/theme/common'; import { deviceWidth } from '@src/configs/theme/common'; interface ImageBackgroundSvgProps { width?: number; height?: number; xml: string; children: React.ReactNode; } const ImageBackgroundSvg = ({width, height, xml, children}: ImageBackgroundSvgProps) => { if (!xml || typeof xml !== 'string') { return ( <View style={styles.container}> {children} </View> ); } return ( <View style={styles.container}> <View style={styles.background}> <SvgXml width={deviceWidth} height={deviceHeight} xml={xml} /> </View> {children} </View> ) } export default ImageBackgroundSvg const styles = StyleSheet.create({ container: { flex: 1, position: 'relative', }, background: { position: 'absolute', top: 0, left: 0, }, })
react-native-svg.
https://snack.expo.dev/@expo.hoangdv/rn-svg-bug
15.8.0
0.73.1
iOS
None
iOS simulator
iPhone 16 Pro
Yes
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The rendered SVG in React Native appears darker than the original file.
original svg:


screenshot using react-native-svg:
Here is the code:
Steps to reproduce
react-native-svg.
Snack or a link to a repository
https://snack.expo.dev/@expo.hoangdv/rn-svg-bug
SVG version
15.8.0
React Native version
0.73.1
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
iOS simulator
Device model
iPhone 16 Pro
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: