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

Wrong colormap spec for HTML in documentation #482

Open
f380cedric opened this issue Jun 24, 2024 · 1 comment
Open

Wrong colormap spec for HTML in documentation #482

f380cedric opened this issue Jun 24, 2024 · 1 comment
Labels

Comments

@f380cedric
Copy link

Hello 👋,

In the Colormap Input Format Reference (p. 196)

\item \declareandlabel{rgb} which expects \meta{arguments} of the
form |(|\meta{red}|,|\meta{green}|,|\meta{blue}|)| where each
component is in the interval $[0,1]$,
\item \declareandlabel{rgb255} which is similar to |rgb| except that
each component is expected in the interval |[0,255]|,
\item \declareandlabel{gray} in which case \meta{arguments} is a
single number in the interval $[0,1]$,
\item \declareandlabel{color} in which case \meta{arguments} contains
a predefined (named) color like `|red|' or a color expression
like `|red!50|',
\item \declareandlabel{cmyk} which expects \meta{arguments} of the
form
|(|\meta{cyan}|,|\meta{magenta}|,|\meta{yellow}|,|\meta{black}|)|
where each component is in the interval $[0,1]$,
\item \declareandlabel{cmyk255} which is the same as |cmyk| but
expects components in the interval $[0,255]$,
\item \declareandlabel{cmy} which expects \meta{arguments} of the
form |(|\meta{cyan}|,|\meta{magenta}|,|\meta{yellow}|)| where
each component is in the interval $[0,1]$,
\item \declareandlabel{hsb} which expects \meta{arguments} of the
form |(|\meta{hue}|,|\meta{saturation}|,|\meta{brightness}|)|
where each component is in the interval $[0,1]$,
\item \declareandlabel{Hsb} which is the same as |hsb| except that
\meta{hue} is accepted in the interval $[0,360]$ (degree),
\item \declareandlabel{HTML} which is similar to |rgb255| except that
each component is expected to be a hex number between |00| and
|FF|,

HTML is defined as rbg but instead of decimal, it's hex.
However, the package does not seems to accepts HTML=(XX,XX,XX) but HTML=(XXXXXX) (IMO, the latter format is better).

@Mo-Gul Mo-Gul added the manual label Jun 24, 2024
@Mo-Gul
Copy link
Contributor

Mo-Gul commented Jun 24, 2024

You are right. The description here is a bit short/imprecise. I think it is much better at

% ATTENTION : a VERY similar description (actually: the same) is in the
% colormap section
% maintain both; the syntax is different
\begin{description}
\renewcommand\makelabel[1]{\declaretext{#1}}%
\setlength{\labelsep}{0pt}
\item[rgb] |=|\meta{red}|,|\meta{green}|,|\meta{blue} where each
component is in the interval $[0,1]$,
\item[rgb255] |=|\meta{red}|,|\meta{green}|,|\meta{blue} is similar to
|rgb| except that each component is expected in the interval
|[0,255]|,
\item[gray] |=|\meta{value} with \meta{value} in the interval $[0,1]$,
\item[color] |=|\meta{named color} where \meta{named color} is a
predefined (named) color like `|red|' or a color expression like
`|red!50|',
\item[cmyk]
|=|\meta{cyan}|,|\meta{magenta}|,|\meta{yellow}|,|\meta{black} where
each component is in the interval $[0,1]$,
\item[cmyk255]
|=|\meta{cyan}|,|\meta{magenta}|,|\meta{yellow}|,|\meta{black} is the
same as |cmyk| but expects components in the interval $[0,255]$,
\item[cmy] |=|\meta{cyan}|,|\meta{magenta}|,|\meta{yellow} where each
component is in the interval $[0,1]$,
\item[hsb] |=|\meta{hue}|,|\meta{saturation}|,|\meta{brightness} where
each component is in the interval $[0,1]$,
\item[Hsb] |=|\meta{hue}|,|\meta{saturation}|,|\meta{brightness} is the
same as |hsb| except that \meta{hue} is accepted in the interval
$[0,360]$ (degree),
\item[HTML] |=|\meta{hex red}\meta{hex green}\meta{hex blue} where
component is expected to be a hex number between |00| and |FF| (a
variant of |rgb255|),
\item[wave] |=|\meta{wave length} which expects a single wave length as
numeric argument in the range $[363,814]$.
\end{description}

It should be in sync (again). At least there should be a link to the above position ...

(I didn't check yet, if these position ever were in sync.)

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

No branches or pull requests

2 participants