summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/opencolor
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/opencolor')
-rw-r--r--macros/latex/contrib/opencolor/LICENSE21
-rw-r--r--macros/latex/contrib/opencolor/README.md45
-rw-r--r--macros/latex/contrib/opencolor/demo-opencolor.pdfbin0 -> 15089 bytes
-rw-r--r--macros/latex/contrib/opencolor/demo-opencolor.pngbin0 -> 189796 bytes
-rw-r--r--macros/latex/contrib/opencolor/demo-opencolor.tex26
-rw-r--r--macros/latex/contrib/opencolor/opencolor.sty154
6 files changed, 246 insertions, 0 deletions
diff --git a/macros/latex/contrib/opencolor/LICENSE b/macros/latex/contrib/opencolor/LICENSE
new file mode 100644
index 0000000000..0e3bcfd492
--- /dev/null
+++ b/macros/latex/contrib/opencolor/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2022 Michele Piazzai
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/macros/latex/contrib/opencolor/README.md b/macros/latex/contrib/opencolor/README.md
new file mode 100644
index 0000000000..4debc90ece
--- /dev/null
+++ b/macros/latex/contrib/opencolor/README.md
@@ -0,0 +1,45 @@
+<!--
+opencolor-latex v1.0.0
+Author: Michele Piazzai
+Contact: michele.piazzai@uc3m.es
+License: MIT
+-->
+
+# opencolor-latex
+
+This is a simple LaTeX package that provides hexadecimal color definitions of the 130 colors included in the [Open Color](https://yeun.github.io/open-color/) library (v1.9.1). Open Color's goal is to provide a selection of colors optimized for UI design. Although LaTeX is a typesetting system primarily intended for print, many of the documents it produces never get printed, in which case it makes sense to use colors suitable for on-screen reading.
+
+Open Colors are organized according to 13 hues (gray, red, pink, grape, violet, indigo, blue, cyan, teal, green, lime, yellow, orange) and 10 brightness levels (0–9). The naming convention is `oc-(color)-(number)`. At the same brightness level, the perceived brightness of different hues aims to be constant.
+
+The package's only dependency is [xcolor](https://www.ctan.org/pkg/xcolor), which is included in most LaTeX distributions.
+
+## Demo
+
+![](https://github.com/piazzai/opencolor-latex/blob/master/demo-opencolor.png)
+
+## Installation
+
+The package is hosted on CTAN and distributed as part of MikTeX and TeXLive. It can also be installed manually by cloning this repository in your `$HOME/texmf/tex/latex` folder. If you do not have this folder, [you can create it](https://www.ias.edu/math/computing/faq/local-latex-style-files).
+
+## Usage
+
+The choice of colors for a document is a responsibility of the author, but UI design principles can provide helpful guidelines. For example, in a beamer presentation, `oc-gray-1` could be used instead of white and `oc-gray-9` instead of black in order to reduce eye strain. If a color like `oc-teal-6` is used for a plot, then it would be best for other plots to use colors at the same brightness level, like `oc-orange-6`, for visual consistency.
+
+## Minimal working example
+
+```tex
+\documentclass{article}
+
+\usepackage{opencolor}
+
+\begin{document}
+ \textcolor{oc-red-8}{Hello}
+ \textcolor{oc-blue-6}{,}
+ \textcolor{oc-lime-9}{world}
+ \textcolor{oc-grape-7}{!}
+\end{document}
+```
+
+## Bugs
+
+The package merely loads xcolor and then provides color definitions, so any error or warning is most likely due to xcolor. Nonetheless, if you encounter any problem using this package, please [open an issue](https://github.com/piazzai/opencolor-latex/issues).
diff --git a/macros/latex/contrib/opencolor/demo-opencolor.pdf b/macros/latex/contrib/opencolor/demo-opencolor.pdf
new file mode 100644
index 0000000000..1f38189fec
--- /dev/null
+++ b/macros/latex/contrib/opencolor/demo-opencolor.pdf
Binary files differ
diff --git a/macros/latex/contrib/opencolor/demo-opencolor.png b/macros/latex/contrib/opencolor/demo-opencolor.png
new file mode 100644
index 0000000000..bd0ff08e1b
--- /dev/null
+++ b/macros/latex/contrib/opencolor/demo-opencolor.png
Binary files differ
diff --git a/macros/latex/contrib/opencolor/demo-opencolor.tex b/macros/latex/contrib/opencolor/demo-opencolor.tex
new file mode 100644
index 0000000000..a8bc47018b
--- /dev/null
+++ b/macros/latex/contrib/opencolor/demo-opencolor.tex
@@ -0,0 +1,26 @@
+% opencolor-latex v1.0.0
+% Author: Michele Piazzai
+% Contact: michele.piazzai@uc3m.es
+% License: MIT
+
+\documentclass{standalone}
+
+\usepackage{tikz}
+\usetikzlibrary{calc}
+
+\usepackage{etoolbox}
+\usepackage{opencolor}
+
+\newcommand\w{9em}
+\newcommand\h{4.5em}
+
+\begin{document}
+\begin{tikzpicture}
+ \foreach \c [count=\x] in {gray,red,pink,grape,violet,indigo,blue,cyan,teal,green,lime,yellow,orange} {%
+ \foreach \b in {0,...,9} {%
+ \draw[\ifnumgreater{\x}{1}{black}{\ifnumgreater{\b}{6}{white}{black}}] (\b*\w,-\x*\h) node [draw=black,fill=oc-\c-\b,minimum width=\w,minimum height=\h] {\ttfamily\large oc-\c-\b};
+ }
+ }
+\end{tikzpicture}
+
+\end{document}
diff --git a/macros/latex/contrib/opencolor/opencolor.sty b/macros/latex/contrib/opencolor/opencolor.sty
new file mode 100644
index 0000000000..df34ae2a76
--- /dev/null
+++ b/macros/latex/contrib/opencolor/opencolor.sty
@@ -0,0 +1,154 @@
+% opencolor-latex v1.0.0
+% Author: Michele Piazzai
+% Contact: michele.piazzai@uc3m.es
+% License: MIT
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{opencolor}[2022/09/15 Open Color]
+
+\RequirePackage{xcolor}
+
+\definecolor{oc-gray-0}{HTML}{F8F9FA}
+\definecolor{oc-gray-1}{HTML}{F1F3F5}
+\definecolor{oc-gray-2}{HTML}{E9ECEF}
+\definecolor{oc-gray-3}{HTML}{DEE2E6}
+\definecolor{oc-gray-4}{HTML}{CED4DA}
+\definecolor{oc-gray-5}{HTML}{ADB5BD}
+\definecolor{oc-gray-6}{HTML}{868E96}
+\definecolor{oc-gray-7}{HTML}{495057}
+\definecolor{oc-gray-8}{HTML}{343A40}
+\definecolor{oc-gray-9}{HTML}{212529}
+
+\definecolor{oc-red-0}{HTML}{FFF5F5}
+\definecolor{oc-red-1}{HTML}{FFE3E3}
+\definecolor{oc-red-2}{HTML}{FFC9C9}
+\definecolor{oc-red-3}{HTML}{FFA8A8}
+\definecolor{oc-red-4}{HTML}{FF8787}
+\definecolor{oc-red-5}{HTML}{FF6B6B}
+\definecolor{oc-red-6}{HTML}{FA5252}
+\definecolor{oc-red-7}{HTML}{F03E3E}
+\definecolor{oc-red-8}{HTML}{E03131}
+\definecolor{oc-red-9}{HTML}{C92A2A}
+
+\definecolor{oc-pink-0}{HTML}{FFF0F6}
+\definecolor{oc-pink-1}{HTML}{FFDEEB}
+\definecolor{oc-pink-2}{HTML}{FCC2D7}
+\definecolor{oc-pink-3}{HTML}{FAA2C1}
+\definecolor{oc-pink-4}{HTML}{F783AC}
+\definecolor{oc-pink-5}{HTML}{F06595}
+\definecolor{oc-pink-6}{HTML}{E64980}
+\definecolor{oc-pink-7}{HTML}{D6336C}
+\definecolor{oc-pink-8}{HTML}{C2255C}
+\definecolor{oc-pink-9}{HTML}{A61E4D}
+
+\definecolor{oc-grape-0}{HTML}{F8F0FC}
+\definecolor{oc-grape-1}{HTML}{F3D9FA}
+\definecolor{oc-grape-2}{HTML}{EEBEFA}
+\definecolor{oc-grape-3}{HTML}{E599F7}
+\definecolor{oc-grape-4}{HTML}{DA77F2}
+\definecolor{oc-grape-5}{HTML}{CC5DE8}
+\definecolor{oc-grape-6}{HTML}{BE4BDB}
+\definecolor{oc-grape-7}{HTML}{AE3EC9}
+\definecolor{oc-grape-8}{HTML}{9C36B5}
+\definecolor{oc-grape-9}{HTML}{862E9C}
+
+\definecolor{oc-violet-0}{HTML}{F3F0FF}
+\definecolor{oc-violet-1}{HTML}{E5DBFF}
+\definecolor{oc-violet-2}{HTML}{D0BFFF}
+\definecolor{oc-violet-3}{HTML}{B197FC}
+\definecolor{oc-violet-4}{HTML}{9775FA}
+\definecolor{oc-violet-5}{HTML}{845EF7}
+\definecolor{oc-violet-6}{HTML}{7950F2}
+\definecolor{oc-violet-7}{HTML}{7048E8}
+\definecolor{oc-violet-8}{HTML}{6741D9}
+\definecolor{oc-violet-9}{HTML}{5F3DC4}
+
+\definecolor{oc-indigo-0}{HTML}{EDF2FF}
+\definecolor{oc-indigo-1}{HTML}{DBE4FF}
+\definecolor{oc-indigo-2}{HTML}{BAC8FF}
+\definecolor{oc-indigo-3}{HTML}{91A7FF}
+\definecolor{oc-indigo-4}{HTML}{748FFC}
+\definecolor{oc-indigo-5}{HTML}{5C7CFA}
+\definecolor{oc-indigo-6}{HTML}{4C6EF5}
+\definecolor{oc-indigo-7}{HTML}{4263EB}
+\definecolor{oc-indigo-8}{HTML}{3B5BDB}
+\definecolor{oc-indigo-9}{HTML}{364FC7}
+
+\definecolor{oc-blue-0}{HTML}{E7F5FF}
+\definecolor{oc-blue-1}{HTML}{D0EBFF}
+\definecolor{oc-blue-2}{HTML}{A5D8FF}
+\definecolor{oc-blue-3}{HTML}{74C0FC}
+\definecolor{oc-blue-4}{HTML}{4DABF7}
+\definecolor{oc-blue-5}{HTML}{339AF0}
+\definecolor{oc-blue-6}{HTML}{228BE6}
+\definecolor{oc-blue-7}{HTML}{1C7ED6}
+\definecolor{oc-blue-8}{HTML}{1971C2}
+\definecolor{oc-blue-9}{HTML}{1864AB}
+
+\definecolor{oc-cyan-0}{HTML}{E3FAFC}
+\definecolor{oc-cyan-1}{HTML}{C5F6FA}
+\definecolor{oc-cyan-2}{HTML}{99E9F2}
+\definecolor{oc-cyan-3}{HTML}{66D9E8}
+\definecolor{oc-cyan-4}{HTML}{3BC9DB}
+\definecolor{oc-cyan-5}{HTML}{22B8CF}
+\definecolor{oc-cyan-6}{HTML}{15AABF}
+\definecolor{oc-cyan-7}{HTML}{1098AD}
+\definecolor{oc-cyan-8}{HTML}{0C8599}
+\definecolor{oc-cyan-9}{HTML}{0B7285}
+
+\definecolor{oc-teal-0}{HTML}{E6FCF5}
+\definecolor{oc-teal-1}{HTML}{C3FAE8}
+\definecolor{oc-teal-2}{HTML}{96F2D7}
+\definecolor{oc-teal-3}{HTML}{63E6BE}
+\definecolor{oc-teal-4}{HTML}{38D9A9}
+\definecolor{oc-teal-5}{HTML}{20C997}
+\definecolor{oc-teal-6}{HTML}{12B886}
+\definecolor{oc-teal-7}{HTML}{0CA678}
+\definecolor{oc-teal-8}{HTML}{099268}
+\definecolor{oc-teal-9}{HTML}{087F5B}
+
+\definecolor{oc-green-0}{HTML}{EBFBEE}
+\definecolor{oc-green-1}{HTML}{D3F9D8}
+\definecolor{oc-green-2}{HTML}{B2F2BB}
+\definecolor{oc-green-3}{HTML}{8CE99A}
+\definecolor{oc-green-4}{HTML}{69DB7C}
+\definecolor{oc-green-5}{HTML}{51CF66}
+\definecolor{oc-green-6}{HTML}{40C057}
+\definecolor{oc-green-7}{HTML}{37B24D}
+\definecolor{oc-green-8}{HTML}{2F9E44}
+\definecolor{oc-green-9}{HTML}{2B8A3E}
+
+\definecolor{oc-lime-0}{HTML}{F4FCE3}
+\definecolor{oc-lime-1}{HTML}{E9FAC8}
+\definecolor{oc-lime-2}{HTML}{D8F5A2}
+\definecolor{oc-lime-3}{HTML}{C0EB75}
+\definecolor{oc-lime-4}{HTML}{A9E34B}
+\definecolor{oc-lime-5}{HTML}{94D82D}
+\definecolor{oc-lime-6}{HTML}{82C91E}
+\definecolor{oc-lime-7}{HTML}{74B816}
+\definecolor{oc-lime-8}{HTML}{66A80F}
+\definecolor{oc-lime-9}{HTML}{5C940D}
+
+\definecolor{oc-yellow-0}{HTML}{FFF9DB}
+\definecolor{oc-yellow-1}{HTML}{FFF3BF}
+\definecolor{oc-yellow-2}{HTML}{FFEC99}
+\definecolor{oc-yellow-3}{HTML}{FFE066}
+\definecolor{oc-yellow-4}{HTML}{FFD43B}
+\definecolor{oc-yellow-5}{HTML}{FCC419}
+\definecolor{oc-yellow-6}{HTML}{FAB005}
+\definecolor{oc-yellow-7}{HTML}{F59F00}
+\definecolor{oc-yellow-8}{HTML}{F08C00}
+\definecolor{oc-yellow-9}{HTML}{E67700}
+
+\definecolor{oc-orange-0}{HTML}{FFF4E6}
+\definecolor{oc-orange-1}{HTML}{FFE8CC}
+\definecolor{oc-orange-2}{HTML}{FFD8A8}
+\definecolor{oc-orange-3}{HTML}{FFC078}
+\definecolor{oc-orange-4}{HTML}{FFA94D}
+\definecolor{oc-orange-5}{HTML}{FF922B}
+\definecolor{oc-orange-6}{HTML}{FD7E14}
+\definecolor{oc-orange-7}{HTML}{F76707}
+\definecolor{oc-orange-8}{HTML}{E8590C}
+\definecolor{oc-orange-9}{HTML}{D9480F}
+
+\endinput