Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing text color in preview #638

Open
Rafinator07 opened this issue May 7, 2024 · 3 comments
Open

Changing text color in preview #638

Rafinator07 opened this issue May 7, 2024 · 3 comments

Comments

@Rafinator07
Copy link

I try to change text color like this :

[blue]#My Text#
[pink]#My Second Text#

'blue' is working but 'pink' does'nt work.
I don't know where the settings file is, which would allow me to add my own colors.

@rahmanusta
Copy link
Member

rahmanusta commented May 8, 2024

You can use purple instead of pink

[blue]#My Text#
[purple]#My Second Text#
asciidoctor.css has the colors declared

.aqua{color:#00bfbf}
.aqua-background{background:#00fafa}
.black{color:#000}
.black-background{background:#000}
.blue{color:#0000bf}
.blue-background{background:#0000fa}
.fuchsia{color:#bf00bf}
.fuchsia-background{background:#fa00fa}
.gray{color:#606060}
.gray-background{background:#7d7d7d}
.green{color:#006000}
.green-background{background:#007d00}
.lime{color:#00bf00}
.lime-background{background:#00fa00}
.maroon{color:#600000}
.maroon-background{background:#7d0000}
.navy{color:#000060}
.navy-background{background:#00007d}
.olive{color:#606000}
.olive-background{background:#7d7d00}
.purple{color:#600060}
.purple-background{background:#7d007d}
.red{color:#bf0000}
.red-background{background:#fa0000}
.silver{color:#909090}
.silver-background{background:#bcbcbc}
.teal{color:#006060}
.teal-background{background:#007d7d}
.white{color:#bfbfbf}
.white-background{background:#fafafa}
.yellow{color:#bfbf00}
.yellow-background{background:#fafa00}

You can override the default css by the way.

@Rafinator07
Copy link
Author

Rafinator07 commented May 23, 2024

This isn't working, but when i generate html, I just add my color in the code directly.
Before I mark my lines with the new color

@rahmanusta
Copy link
Member

rahmanusta commented May 23, 2024

You need custom css/theme. Check how to override asciidoctor’s default css and provide custom css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants