Skip to content

icon_svg "fill" parameter does not adjst icon fill color #9

@mfebrizio

Description

@mfebrizio
  • faicons version: 0.2.2
  • Python version: 3.11.9
  • Operating System: macOS 12.7.5

Description

I've been trying to adjust the color of icons in my Shiny app. However, I can't seem to get it changed, and it might be related to the faicons package.

The "fill" parameter seems to be what I want, given its description: "The icon's fill color."

fill_opacity seems to be working, at least.

Below is a simple reproducible example.

What I Did

from faicons import icon_svg
from shiny.express import input, render, ui

FILL_COLOR = "green"

with ui.layout_column_wrap():
    with ui.value_box(showcase=icon_svg("book", fill=FILL_COLOR, fill_opacity=0.5)):
        "Test example"
        @render.text
        def _(val_ = FILL_COLOR):
            return f"Is this {val_}?"

fa icon remains blue, rather than green (or any other color).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions