Crate scarlet [−] [src]
Scarlet is a library for making color, color spaces, and everything that comes with it simple to work with. The underlying philosophy is that if all you have is a hammer, everything looks like a nail: existing color libraries often only work with RGB or other convenient color spaces, and so go to great lengths to invent complicated workarounds for the essential problems with RGB and its ilk, namely not being very good analogues to the way humans actually see color. Scarlet makes working with color convenient enough that it's easier to treat colors correctly than it is to do anything else.
Modules
bound |
This module describes the [ |
color |
This file defines the [ |
colormap |
This module defines a generalized trait, [ |
colorpoint |
This file implements most of the standard color functions that essentially work on 3D space,
including Euclidean distance, midpoints, and more. All of these methods work on
|
colors |
This module contains various modules that implement types that implement |
coord |
This module contains a struct, [ |
illuminants |
This module provides an enum of various illuminants supported by Scarlet, as well as their white point values.The source for this table is from the ASTM E308 standard. The only one I could find available freely was the outdated E308-01 standard, but these values should be the same: they're both copied photographically from the CIE standard itself. These are normalized so that the Y (luminance) value is 100. |
material_colors |
This file provides some basic facilities for creating a |
prelude |
This module simply brings the most common Scarlet functionality under a single namespace, to
prevent excessive imports. As of now, this prelude includes every trait in Scarlet, the
ubiquitous |