12

I want to change bootstrap glyphicon color to "yellow" because current color is showing in white that looks like Delete button. How can i change color of glyphicon-folder-close or use any other glyphicon that display folder image better ?

main.html

<button type="button" class="btn btn-info btn-lg" ng-click="serverFiles()" style="margin-left: 10px"><span class="glyphicon glyphicon-folder-close"></span></button>
hussain
  • 6,587
  • 18
  • 79
  • 152

6 Answers6

17

You can also change the icon/text by adding to the class "text-success" for green, "text-danger" for red etc. This will change the color of the icon itself.

<span class="glyphicon glyphicon-usd text-success"></span>

Also this has been answered here.

Change the color of glyphicons to blue in some- but not at all places using Bootstrap 2

Andrew
  • 399
  • 6
  • 15
8

Use color

 <button type="button" 
      class="btn btn-info btn-lg" ng-click="serverFiles()"
      style="margin-left: 10px; color:#FF0000;">
          <span class="glyphicon glyphicon-folder-close"></span></button>

But remember that it is desirable to avoid the use of inline style is better use classes or references based on external css configuration items

 <button type="button" 
      class="btn btn-info btn-lg mybtn-blue" ng-click="serverFiles()"
      style="margin-left: 10px;">
          <span class="glyphicon glyphicon-folder-close"></span></button>

edn for external css

.mybtn-blue {
   color: blue;
}
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
3

Use the following HTML code

<button type="button" class="btn btn-info btn-lg" ng-click="serverFiles()" style="margin-left: 10px"><span class="glyphicon glyphicon-folder-close yellow"></span></button>

And the css code

.yellow {
    color: #FFCA28;
}

here is the demo http://jsfiddle.net/S3R23/1217/

Gowtham
  • 1,557
  • 12
  • 24
2

You can change color of the icon by directly specifying color name, however this will only apply to targeted icon.

<a href="#" class="glyphicon glyphicon-exclamation-sign"  style="color: red; font-size: 20px"></a>
1

To change the color, do this:

<span class="glyphicon glyphicon-folder-close" style="color:#ffff00"></span>

Just edit the span tag in your code to the one above, making your code to look like this:

<button type="button" class="btn btn-info btn-lg" ng-click="serverFiles()" style="margin-left: 10px"><span class="glyphicon glyphicon-folder-close" style="color:#ffff00"></span></button>
Derick Alangi
  • 1,080
  • 1
  • 11
  • 31
  • This link will also help you: http://stackoverflow.com/questions/18070322/how-do-i-change-bootstrap-3s-glyphicons-to-white – Derick Alangi Aug 16 '16 at 16:00
0

You can change glyphicon color to any value. see below given example

<span aria-hidden="true" class="glyphicon form-control-feedback glyphicon-ok"></span>

//css

 .glyphicon.form-control-feedback.glyphicon-ok{
  color: #20032d !important;  
}
Syed Shibli
  • 992
  • 1
  • 12
  • 15