Git Product home page Git Product logo

Comments (5)

marko-avlijas avatar marko-avlijas commented on September 26, 2024 1

That's not true. From other issue, there is a way to specify hex color:

font-awesome-svg-png --color "#0370E9" --svg --no-png --dest blue

I just think it should be included in documentation. Also I didn't know that I can control svg color with CSS. Thanks for that. Gotta read through your links when I have time.

from font-awesome-svg-png.

iegik avatar iegik commented on September 26, 2024

Use fill="currentColor" FortAwesome/Font-Awesome#3203 (comment)

In addition to setting attributes on objects, you can also use CSS to style fills and strokes. In your CSS, you'll be setting values for attributes like fill and stroke instead of background-color and border...
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes#Using_CSS

<svg class="icon"><use xlink:href="fa-sprites-symbols.svg#fa-facebook" fill="currentColor"/></svg>

from font-awesome-svg-png.

marko-avlijas avatar marko-avlijas commented on September 26, 2024

Do you mean --fill="#444"? Or what?

Also I urge the contributors to add that information in README.

from font-awesome-svg-png.

iegik avatar iegik commented on September 26, 2024

https://github.com/encharm/Font-Awesome-SVG-PNG/blob/master/font-awesome-svg-png.js - generates PNG with only two colors: BLACK and WHITE:

'color', "Provide color or colors, e.g. --color black,white"

from font-awesome-svg-png.

iegik avatar iegik commented on September 26, 2024

But if You choose to use SVG sprite, you can colorize seporate symbol with:

  • inline fill attribute
  • inherit color from font color (color css property)

from font-awesome-svg-png.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.