[][src]Module kiss3d_conrod::color

A library providing simple Color and Gradient types along with useful transformations and presets.

Inspiration taken from [elm-lang's color module] (https://github.com/elm-lang/core/blob/62b22218c42fb8ccc996c86bea450a14991ab815/src/Color.elm)

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.

Constants

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

GRAY

Alluminium - Regular

GREEN

Chameleon - Regular - #73D216

GREY

Aluminium - Regular - #D3D7CF

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

Scarlet Red - Light - #EF2929

LIGHT_YELLOW

Butter - Light - #FCE94F

ORANGE

Orange - Regular - #F57900

PURPLE

Plum - Regular - #75507B

RED

Scarlet Red - Regular - #CC0000

TRANSPARENT

Transparent

WHITE

Straight White.

YELLOW

Butter - Regular - #EDD400

Traits

Colorable

Types that can be colored.

Functions

f32_to_byte

Convert an f32 color to a byte.

grayscale

Produce a gray based on the input. 0.0 is white, 1.0 is black.

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.

linear

Create a linear gradient.

radial

Create a radial gradient.

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.

Type Definitions

Colour

Regional spelling alias.