Module elmesque::color
[−]
[src]
A library providing simple Color and Gradient types along with useful transformations and
presets.
Inspiration taken from elm-lang's color module
Module for working with colors. Includes RGB and HSL creation, gradients and built-in names.
Structs
| Hsla |
The parts of HSL along with an alpha for transparency. |
| Rgba |
The parts of RGB along with an alpha for transparency. |
Enums
| Color |
Color supporting RGB and HSL variants. |
| Gradient |
Linear or Radial Gradient. |
Traits
| Colorable |
Types that can be colored. |
Functions
| black |
Straight Black. |
| blue |
Sky Blue - Regular - #3465A4 |
| brown |
Chocolate - Regular - #C17D11 |
| charcoal |
Charcoal - Regular - #555753 |
| dark_blue |
Sky Blue - Dark - #204A87 |
| dark_brown |
Chocolate - Dark - #8F5902 |
| dark_charcoal |
Charcoal - Dark - #2E3436 |
| dark_gray |
Alluminium - Dark |
| dark_green |
Chameleon - Dark - #4E9A06 |
| dark_grey |
Aluminium - Dark - #BABDB6 |
| dark_orange |
Orange - Dark - #CE5C00 |
| dark_purple |
Plum - Dark - #5C3566 |
| dark_red |
Scarlet Red - Dark - #A30000 |
| dark_yellow |
Butter - Dark - #C4A000 |
| f32_to_byte |
Convert an f32 color to a byte. |
| gray |
Alluminium - Regular |
| grayscale |
Produce a gray based on the input. 0.0 is white, 1.0 is black. |
| green |
Chameleon - Regular - #73D216 |
| grey |
Aluminium - Regular - #D3D7CF |
| greyscale |
Produce a gray based on the input. 0.0 is white, 1.0 is black. |
| hsl |
Create HSL colors. This gives you access to colors more like a color wheel, where all hues are arranged in a circle that you specify with radians. |
| hsl_to_rgb |
Pure function for converting hsl to rgb. |
| hsla |
Create HSL colors with an alpha component for transparency. |
| light_blue |
Sky Blue - Light - #729FCF |
| light_brown |
Chocolate - Light - #E9B96E |
| light_charcoal |
Charcoal - Light - #888A85 |
| light_gray |
Alluminium - Light |
| light_green |
Chameleon - Light - #8AE234 |
| light_grey |
Aluminium - Light - #EEEEEC |
| light_orange |
Orange - Light - #FCAF3E |
| light_purple |
Plum - Light - #AD7FA8 |
| light_red |
Built-in colors. |
| light_yellow |
Butter - Light - #FCE94F |
| linear |
Create a linear gradient. |
| orange |
Orange - Regular - #F57900 |
| purple |
Plum - Regular - #75507B |
| radial |
Create a radial gradient. |
| random |
Construct a random color. |
| red |
Scarlet Red - Regular - #CC0000 |
| rgb |
Create RGB colors from numbers between 0.0 and 1.0. |
| rgb_bytes |
Create RGB colors from numbers between 0 and 255 inclusive. |
| rgb_to_hsl |
Pure function for converting rgb to hsl. |
| rgba |
Create RGB colors with an alpha component for transparency. The alpha component is specified with numbers between 0 and 1. |
| rgba_bytes |
Create RGB colors from numbers between 0 and 255 inclusive. The alpha component is specified with numbers between 0 and 1. |
| white |
Straight White. |
| yellow |
Butter - Regular - #EDD400 |
Type Definitions
| Colour |
Regional spelling alias. |