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.

how to use the text-color helper ?

See original GitHub issue

bug

What happened: when I define a dark color for the section copyright the helper text-color don’t seams to understand my color is dark and so the text still dark too.

I look a little bit around for related issues/PR and I found

What you expected to happen: I was expecting the helper would understand my background color and switch my text color to white/light.

How to reproduce it (as minimally and precisely as possible):

my ./config.toml

  [params.colors]
    primary = "#122931"
    secondary = "#79919b"
    success = "#85b253"
    info = "#a0bac4"
    warning = "#ffc95b"
    danger = "#be4a00"
    light = "#f3feff"
    dark = "#343a40"

my ./content/_global/copyright.md

+++
fragment = "copyright"
weight = 1250
background = "primary"
+++

Anything else we need to know?:

While my expectation is more me being able to control the text color such as we are able to do with the background, such as in ./content/_global/copyright.md I would expect to be able to define the text_color such as:

+++
fragment = "copyright"
text_color = "light"
+++

Environment:

  • Syna Theme version: v0.17.0
  • Hugo version: hugo_extended_0.71.0_Linux-64bit.deb

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JOduMonTcommented, May 26, 2020

I restart from scratch my project today with version = “0.17.1” not sure what was the issue but now it’s working, 😃

0reactions
stp-ipcommented, Jun 24, 2020

We can’t detect the colors and especially their darkness and therefore use the darkness levels from the default bootstrap colors as indicator. Meaning this is a bit more hardcoded than one might expect. Primary should not be used with a dark color. You can circumvent this by using dark as your basically primary color instead. Aka keep the darkness level for each color similar and then use dark within setting the background. So yes that is unfortunately intentional or at least hard to fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Text Color | Coding Help Wikia - Fandom
Text color is an attribute that allows you to change the color of your text. There are multiple ways to do it, such...
Read more >
Help:Text color - Meta-Wiki - Wikimedia
Set text color by using <span style="color:#009999"> · Set background color by using <span style="background:#00FF00"> · Set both by using <span ...
Read more >
Change the default text color (font color) in Word
Select the arrow next to Font color, and then choose a color. Font color in font dialog. Select Set As Default and then...
Read more >
Color helpers - Bulma
Color helpers. Change the color of the text and/or background. Text color # ... You can use each color in their light and...
Read more >
How to Change the Text Color in WordPress (3 Easy Methods)
This will open up a color picker where you can manually select a color. You can also use this to type in a...
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