colors

variables

green-color

$green-color: #2da42c;

Type

Color

blue-color

$blue-color: #3477ff;

Type

Color

purple-color

$purple-color: #802efb;

Type

Color

red-color

$red-color: #ef3360;

Type

Color

yellow-color

$yellow-color: #ffc800;

Type

Color

black-color

$black-color: #071417;

Type

Color

white-color

$white-color: #fff;

Type

Color

variants-color-alpha

$variants-color-alpha: (
  "100": 14,
  "200": 28,
  "300": 42
);

Description

A map of alpha variants for colors.

Type

Map

Used by

variants-bw-alpha

$variants-bw-alpha: (
  "50":  7,
  "100": 14,
  "150": 21,
  "200": 28,
  "250": 35,
  "300": 42
);

Description

A map of alpha variants for black and white colors.

Type

Map

Used by

brand-color

$brand-color: $green-color;

Description

Brand colors of the Kit.

Type

Color

action-color

$action-color: $blue-color;

Description

Action color of the Kit.

Type

Color

primary-color

$primary-color: $black-color;

Description

Primary color of the Kit.

Type

Color

secondary-color

$secondary-color: mix($black-color, #fff, map-get($variants-bw-alpha, "300"));

Description

Secondary color of the Kit, A mix of black color with alpha.

Type

Color

background-color

$background-color: mix($black-color, #fff, map-get($variants-bw-alpha, "50"));

Description

Background color of the Kit.

Type

Color

color-palette

$color-palette: (
  "green":      $green-color,
  "blue":       $blue-color,
  "purple":     $purple-color,
  "red":        $red-color,
  "yellow":     $yellow-color,
  "black":      $black-color,
  "white":      $white-color,

  "brand":      $brand-color,
  "action":     $action-color,
  "primary":    $primary-color,
  "secondary":  $secondary-color,
  "background": $background-color
);

Description

A map of all the colors in the Kit.

Type

Map

Used by

functions

[private] get-alpha-variant

@function get-alpha-variant($variants, $variant) { ... }

Description

Matches given $variant to the alpha value in given $variants map.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$variants

Map of variants and their alphas

Map none
$variant

A number between 100-300 multiples by 100 for colors, and a number between 50-300 multiples by 50 for black and white colors.

Number none

Returns

Number

A number between 0 to 1.

Example

get-alpha-variant($variants-bw-alpha, 100); // 0.14

Throws

  • Sorry

Used by

[private] get-alpha

@function get-alpha($color, $variant) { ... }

Description

Gets the alpha value of a color by it's variant.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color

Name of a color to determine which variants map to use.

String none
$variant

A number between 100-300 multiples by 100 for colors, and a number between 50-300 multiples by 50 for black and white colors.

Number none

Returns

Number

A number between 0 to 1.

Example

get-alpha('black', 50) // 0.07
get-alpha('green') // 1

Requires

Used by

[private] get-color

@function get-color($color: null) { ... }

Description

Gets a color HEX from $color-palette variable.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$color

Name of a color

Stringnull

Returns

Color

Value in HEX format

Example

get-color("green"); // #2da42c

Throws

  • Sorry

Requires

Used by

palette

@function palette($name: null, $variant: null, $opacity: false) { ... }

Description

Generates a color value in HEX or RGBA based on $color-palette map and variant maps.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$name

The name of a color

Stringnull
$variant

The variant of a color

Numbernull
$opacity

Should the color be returned with transparancy match the variant

Booleanfalse

Returns

Color

Color value in HEX or RGBA format.

Example

body {
  background-color: palette("green");         // #2da42c
  color: palette("black", 300);               // #979c9e
  border-color: palette('purple', 100, true); // rgba(128, 46, 251, 0.14)
}

Throws

  • An error if a color name or variant aren't found.

Requires

Used by

mixins

background-color

@mixin background-color($name: null, $variant: null) { ... }

Description

Background color mixin wrapper for palette function.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$name

The name of a color

Stringnull
$variant

The variant of a color

Numbernull

Example

body {
  @include background-color("black", 300);
}

Output

background-color param with HEX or RGBA value

Requires

color

@mixin color($name: null, $variant: null) { ... }

Description

Color mixin wrapper for palette function.

Parameters

parameter Nameparameter Descriptionparameter Typeparameter Default value
$name

The name of a color

Stringnull
$variant

The variant of a color

Numbernull

Example

body {
  @include color("black", 300);
}

Output

color param with HEX or RGBA value

Requires