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

Color definition in macro file seems not to work #201

Closed
ouboub opened this issue Dec 11, 2023 · 2 comments
Closed

Color definition in macro file seems not to work #201

ouboub opened this issue Dec 11, 2023 · 2 comments
Labels
discussion ongoing discussion

Comments

@ouboub
Copy link

ouboub commented Dec 11, 2023

Hi

I put my local compiled quiver in a directory my local Apache Server can read and load the following macro file
via http://localhost/quiver/src/style/quiver-macros.sty

\ProvidesPackage{quiver-macros}[2023/10/12 oub]
\newcommand{\farbboxed}[2]{\fcolorbox{black}{#1}{$\displaystyle#2$}}
\usepackage{xcolor}
\definecolor{DarkOrange}{rgb}{1.000000,0.549020,0.000000}
\definecolor{orange}{RGB}{255,127,0}
\definecolor{Lightorange}{HTML}{FAA21A}
\definecolor{Melon}{HTML}{F89E7B}
\definecolor{Melon}{RGB}{16.8,229.3,185.5}
\definecolor{Melon}{rgb}{0.972549,0.619607,0.482352}

however the color Melon is not displayed I tried HEX and rgb
what do I miss?

@varkor
Copy link
Owner

varkor commented Dec 13, 2023

If you open the colour palette, you will see that the colour has been loaded:
image
However, it's not currently possible to use custom colours using commands like \color, etc. You can only use the colours from the colour palette. This is due to a limitation in KaTeX (#202).

Note that you cannot use the HTML colour format yet in quiver, not are decimal points accepted in the RGB specification. It's also not necessary to use \ProvidesPackage or \usepackage{xcolor} (though it's also harmless to write them). E.g. you could just use:

\newcommand{\farbboxed}[2]{\fcolorbox{black}{#1}{$\displaystyle#2$}}
\definecolor{DarkOrange}{rgb}{1.000000,0.549020,0.000000}
\definecolor{orange}{RGB}{255,127,0}
\definecolor{Melon}{rgb}{0.972549,0.619607,0.482352}

@varkor varkor added the discussion ongoing discussion label Dec 13, 2023
@ouboub
Copy link
Author

ouboub commented Dec 13, 2023

If you open the colour palette, you will see that the colour has been loaded: image However, it's not currently possible to use custom colours using commands like \color, etc. You can only use the colours from the colour palette. This is due to a limitation in KaTeX (#202).

Note that you cannot use the HTML colour format yet in quiver, not are decimal points accepted in the RGB specification. It's also not necessary to use \ProvidesPackage or \usepackage{xcolor} (though it's also harmless to write them). E.g. you could just use:

\newcommand{\farbboxed}[2]{\fcolorbox{black}{#1}{$\displaystyle#2$}}
\definecolor{DarkOrange}{rgb}{1.000000,0.549020,0.000000}
\definecolor{orange}{RGB}{255,127,0}
\definecolor{Melon}{rgb}{0.972549,0.619607,0.482352}

thanks for this explanation, in that case, I will then stick to the predefined colors,
since the diagram I produce is not going to be published anywhere

@varkor varkor closed this as completed Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion ongoing discussion
Projects
None yet
Development

No branches or pull requests

2 participants