question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Icon color difference

See original GitHub issue

Checklist

  • [x ] I updated the card to the latest version available
  • [ x] I cleared the cache of my browser

Describe the bug A clear and concise description of what the bug is. I have 2 cards, but both Icon color are different

The icon of the first button gets the color from --paper-item-icon-color The secon one from --primary-text-color

Do I have any errors in my configuration? Tried a lot of configurations, but always behaved the same for me

Version of the card Version: 3.0.0

To Reproduce This is the configuration I used:

       - color_type: icon
        entity: variable.washingmachine_running
        name: Waschmaschine
        state:
          - icon: 'mdi:washing-machine'
            operator: default
          - icon: 'mdi:washing-machine'
            value: 'on'
        tap_action:
          action: more-info
        type: 'custom:button-card'
      - aspect_ratio: 1.68/1
        icon: 'mdi:flash'
        color_type: icon
        entity: sensor.washingmachine_current_consumption
        name: |
          [[[
            if (states["variable.washingmachine_running"].state == "on") return (states["sensor.washingmachine_current_consumption"].state + ' W');
            else return states["variable.washingmachine_last_consumption"].state + ' kWh';
          ]]]
        tap_action:
          action: more-info
        type: 'custom:button-card'

Screenshots If applicable, add screenshots to help explain your problem.

Expected behavior Icon color should be the same for both buttons

Desktop (please complete the following information):

  • Chrome
  • Version 79.0.3945.88

Additional context

image image image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
RomRidercommented, Jan 5, 2020

You have the same behaviour with the core button card as far as I know. This is why I did it like this in the first place. But I think it’s written in the documentation: https://github.com/custom-cards/button-card/blob/master/README.md#main-options in the color parameter

0reactions
Alexxander0commented, Jan 3, 2020

Guess that will fix it, but at least for me this seems a bit inconsistent and confusing. As its not stated anywhere (at least where if found) And also, I dont see why the Icon should have --primary-text-color, as its obviously not a text I’ll close. Thanks for the great work anyway.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Which Color Should You Use For Your Icon?
Standing out in a sea of blue: Which color should you pick for your icon? · Red · Orange · Yellow · Green...
Read more >
Compare icon in Color Style
Download Compare vector icon in Color style. Available in png, svg, pdf, html code. Modify, resize, recolor Compare icon.
Read more >
Choosing best colours for your next icon set
Depending on the style of your icons you can decide to make them monochromatic, use the shades of the same colour, or choose...
Read more >
Word: Working with Icons - GCFGlobal
Icons are a library of modern, professional graphics included with Office 365 and ... To change the color of an icon, select the...
Read more >
How to style icon color, size, and shadow of FontAwesome ...
For example, FontAwesome's site will show some icons in white and some in red but won't show the CSS for how to style...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found