Icon Color Props

I am very bother . why my color props not working ? It happens all times whenever i am using color for icons . Please Provide me solution .

I have tried -

color=“green”

style={‌{color:“green”}}

every thing

import React from 'react';
import { Entypo} from '@expo/vector-icons';
export default class IconExample extends React.Component {
  render() {
    return <Entypo  name="phone"   size={50} color="#B83227"  />;
  }
}

Does this code not work in a Snack for you? I just used it here and switched the color to “green” and it worked just fine

1 Like

This code is fine but i can`t understand why this is not working on my system (laptop) . Is there any packege missing in my node modules or something else

thanks for your reply .

Screenshot_20190531-152900|281x500

my icon color is not changing …

I have tried -

1-color=“green”

2-style={‌{color:“green”}}

3-color=“#B83227
and every method for color .

I hope you will understand what is the problem

Could you run expo diagnostics and paste the output here? Also, make sure you’re following this guide!

Is this an expo init project? I need step-by-step instructions on how to reproduce this

sorry i don`t understand , why you need “step-by-step instructions” ?

first i have installed NodeJs
then i run npm install -g expo-cli
then i have created project - expo init ProjectName
then i have choose blank template
when my project is created then i started coding on my own logic .

Everything is fine in my code

I have imported everything


import React from 'react';
import { StyleSheet, Text, View,TouchableOpacity,FlatList,
AsyncStorage } from 'react-native';
import {Card} from 'native-base';
import {Entypo} from '@expo/vector-icons';

when i am using vector icons (fontawesome , entypo …) like this

<Entypo
          name="plus"
          size={30}
          color="#fff" />

**Icon is appearing but when i am trying to change the color of Icon , **
like

color="red" or color="green"or color="#B83227" or with styling like style={{color:"#B83227"}} or external styling . every time ICON color remains same BLACK

Just wanted to make sure we were both following the exact same steps, that’s all. Since I can’t get the same behavior, I thought it possible that we were doing something different from each other somewhere.

That is definitely odd. After following your steps, and running expo start I see changes both on device and simulator.

After you save, does your CLI show that your js bundle rebuilt succesfully?

yes sir ! I have publish an simple app on playstore for trial , icon color problem still their .

Is it this project? What color are the icons supposed to be?

yes sir

color i have given :-- "#41f1f4":"green"

i am facing this problem in my all projects

only white color is working : color= "#fff" otherwise by default black color

I opened up your project, and I’m seeing green and the other icons are light blue :thinking:

**I have tried on two android devices

Lenovo K8 (android version : 7.1.1 )+ and nokia 6 (android version : 9 )

Same problem facing :pensive:**

I’m not sure, but you could always use different emulators in Android Studio to test which versions it does/doesn’t seem to work on

**I have tried on two android devices

Lenovo K8 (android version : 7.1.1 )+ and nokia 6 (android version : 9 )

Same problem facing :pensive:**

I have tried native base icons also

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.