Code Monkey home page Code Monkey logo

opencolor's Introduction

opencolor

This is a simple LaTeX package that provides hexadecimal color definitions of the 130 colors included in the 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, which is included in most LaTeX distributions.

Demo

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 it, you can create it.

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 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 consistency.

Minimal working example

\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.

opencolor's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

matgeor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.