how to use the text-color helper ?
See original GitHub issuebug
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
- https://github.com/okkur/syna/issues/415
- https://github.com/okkur/syna/blob/master/layouts/partials/helpers/text-color.html
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:
- Created 3 years ago
- Comments:11 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I restart from scratch my project today with version = “0.17.1” not sure what was the issue but now it’s working, 😃
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.